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

Minor tweak ylim on ecdfplot #2683

Open
ericmjl opened this issue Oct 21, 2021 · 1 comment
Open

Minor tweak ylim on ecdfplot #2683

ericmjl opened this issue Oct 21, 2021 · 1 comment

Comments

@ericmjl
Copy link

ericmjl commented Oct 21, 2021

When we plot an ECDF under sns.set_style("talk"), the default of axes ylims being (0, 1) become a tad problematic for long-tailed distributions. We get the following effect of thin lines at the upper (and I'm assuming lower as well) bounds:

image

An easy fix would be to set the ylim to (-0.05, 1.05). Doing so would fix the effect:

image

Hard-coding the ylim to just beyond (0, 1) is appropriate from a visualization perspective, I believe, because the y-axis on an ECDF, by definition, is supposed to be bound between (0, 1). This feels like an easy PR, and I'm happy to handle it 😄.

@mwaskom
Copy link
Owner

mwaskom commented Nov 26, 2021

Hi, I can see how the half-clipped line when you don't have an upper spine is unattractive. But I do think it's kind of a matter of taste if you have spines. Not setting the limits and letting autoscaling handle it could be reasonable, but I'm -1 on hard-coding them at values other than 0/1 (for one thing, it wouldn't work when you have stat="count"). I also don't think I'd like what it would do in the case where you are overlaying an ecdfplot on a histogram.

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