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

Using lmplot with fit_reg=False for scatter plots is unintuitive #1452

Closed
kasuteru opened this issue Jun 13, 2018 · 4 comments
Closed

Using lmplot with fit_reg=False for scatter plots is unintuitive #1452

kasuteru opened this issue Jun 13, 2018 · 4 comments

Comments

@kasuteru
Copy link

kasuteru commented Jun 13, 2018

Problem description:

As a newcomer to seaborn, I was quite surprised that seaborn apparently didn't handle scatterplots. After a minute of googling, I found out that I have to do a regression plot and turn the fitting of the actual regression model off. In my opinion, this is pretty unintuitive.

Proposed fix:

My proposed fix would be to simply have an a seaborn.scatter() or seaborn.scatterplot() method that maps to regplot with fit_reg=False. This would be really easy to implement and make seaborn more easy to understand as a newcomer or if reading code someone else wrote. Surprisingly, seaborn is currently one of the few plotting libraries in Python that support coloring scatterplots by nominal data out-of-the-box (bokeh and matplotlib don't!), so it would be nice if it actually was called scatterplot :-)

@mwaskom mwaskom closed this as completed Jun 13, 2018
@kasuteru
Copy link
Author

No comment about this? Would you merge it into the main branch if I implemented it myself? It does seem like a very minor, non-breaking change.

@mwaskom
Copy link
Owner

mwaskom commented Jun 13, 2018

i guess your "minute of googling" did not turn up #1436

@kasuteru
Copy link
Author

In fact it did not... Seeing as this is a fairly recent change and as of now, is not even documented in the API. Currently, the first google result for "seaborn scatterplot" has the following to say:

Using seaborn, scatterplots are made using the regplot() function.

All the other results on the first page of Google say the same or mention lmplot(). I even searched on github before posting this, but admit that I did not remove the is:issue filter that filtered out #1436.

... Anyways, nice to know it is there now, and thanks for your work on seaborn, it has proven really useful.

@mwaskom
Copy link
Owner

mwaskom commented Jun 18, 2018

Unfortunately I can't control what claims people make or what google chooses to emphasize...

My answer would have been what is in the introductory notes:

Seaborn should be thought of as a complement to matplotlib, not a replacement for it. When using seaborn, it is likely that you will often invoke matplotlib functions directly to draw simpler plots already available through the pyplot namespace.

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

No branches or pull requests

2 participants