Jordan
Jordan

Reputation: 1013

How do I use seaborn's lmplot to show a colobar for hue, instead of exact values?

I'm trying to get my seaborn plot to look something like this: enter image description here

If I use lmplot with the z-axis for the hue, I get this: enter image description here

The lmplot in the picture is basically what I want, but I need the colorbar on the right side instead of the actual values.

I tried to do this with a heatmap, but the data plot was worse that way due to the large gaps between samples.

Thanks for any help!

Upvotes: 1

Views: 1001

Answers (1)

mwaskom
mwaskom

Reputation: 49002

You should use plt.scatter. The hue parameter in lmplot only accepts categorical variables.

Upvotes: 3

Related Questions