Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wishlist for sns.scatterplot #315

Closed
mwaskom opened this issue Oct 3, 2014 · 6 comments
Closed

Wishlist for sns.scatterplot #315

mwaskom opened this issue Oct 3, 2014 · 6 comments

Comments

@mwaskom
Copy link
Owner

mwaskom commented Oct 3, 2014

Open comment thread for functionality that would be good to have in a sns.scatterplot function. Some things that have been mentioned are:

What else?

@shoyer
Copy link
Contributor

shoyer commented Oct 5, 2014

To follow-up on your third bullet (though this is also a bit of separate issue), I've found that continuous point coloring with a FacetGrid/plt.scatter can be very slow when using the hue argument (e.g., it can easily take seconds), because FacetGrid makes separate plots for every color. A faster interface for this would definitely be appreciated.

@mwaskom
Copy link
Owner Author

mwaskom commented Oct 5, 2014

Ah, yeah, currently I wouldn't even say that's something that's supposed to work – everything in FacetGrid is structured so that hue is categorical. I would say that if you want to use a continuous variable you're better off binning it yourself outside of seaborn.

@germannp
Copy link

What about some interactivity? Printing the index or the Series upon klicking the point is very useful when you need to check the raw data underlying a certain point. Such functionality is readily available in matplotlib.
This would maybe even be more suitable for sns.pairplot, as this function is particularly handy for quick data exploration.

@BrenBarn
Copy link

One thing I often wish for is the ability to specify a label for each point, that would be shown as text next to the point. This is very useful for scatterplots with a relatively small number of points which you want to identify individually (e.g., countries, company names, specific products), and it's currently a pain with matplotlib because you can't pass a vector of strings to a single text call. Ideally the point labels could then be turned on and off with a quick command.

@mwaskom
Copy link
Owner Author

mwaskom commented Sep 13, 2015

It would be possible for a seaborn function to accept a vector of strings and draw them, but it would be bound by the same limitations as when you are using matplotlib directly. So each point would have to be a separate object "behind the scenes" and I don't think it would be possilbe to do what you describe in terms of turning the labels on and off.

@dansondergaard
Copy link

In general, it'd be great to be able to change marker size/style depending on the data. E.g.

sns.scatterplot(data, x='PC1', y='PC2', hue='Disease', marker='Sex', size='SampleQuality')

It's currently a drag to do this with sns.lmplot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants