Is the `markers` parameter in scatterplot() not implemented?
See original GitHub issueHello! I’m trying to create a scatter plot where the markers are different for each category (both the colour and the marker style). I can do this in lmplot()
, for example:
iris = sns.load_dataset('iris')
sns.lmplot(data=iris, x='petal_length', y='petal_width', hue='species', markers=['o', '*', '+'], fit_reg=False)
But when I try the equivalent with the scatterplot()
function, the markers are all the same style:
sns.scatterplot(data=iris, x='petal_length', y='petal_width', hue='species', markers=['o', '*', '+'])
I’m wondering if this markers
parameter hasn’t been implemented yet in scatterplot()
, or if it requires a different syntax? I’ve tried various different approaches, but I can’t seem to get the markers to be different styles for different categories.
Alternatively, is there some way that I can use lmplot()
so that the scatter plot it creates can be created as a subplot within a figure with other subplots, that aren’t part of a FacetGrid? This is straightforward with scatterplot()
because I can provide the subplot axes as an input to the function, but I can’t figure out how to do this with lmplot()
.
Any assistance would be greatly appreciated! Thank you!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:14 (8 by maintainers)
You can’t mix filled and line markers, just like the error message says.
Yes, I did read the error message. I was hoping to gain some insight on the inconsistent behaviour between
lmplot()
andscatterplot()
, sincelmplot()
allows filled and line markers to be mixed, whereasscatterplot()
apparently does not. It would have been nice if I could make the same scatter plot with either function, but no big deal. Thanks.