-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Move "howto interpreting box plots" to boxplot docstring #19860
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
Conversation
Box plots provide insight into distribution properties of the data. | ||
However, they can be challenging to interpret for the unfamiliar | ||
reader. The figure below illustrates the different visual features of | ||
a box plot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider also linking to the website version so that people displaying the docstring at their terminal have somewhere to click
or alternatively just replace the png by some ascii art:
Q1-1.5IQR Q1 median Q3 Q3+1.5IQR
|-----:-----|
. |--------| : |--------| . .
|-----:-----|
outlier <----------->
IQR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a link to wikipedia, which IMHO is sufficient.
Furthermore, this note only gives additional context. I assume that only a minority of people will try to learn from the docstring (It's rather used for looking up signature and specific parameters). I don't want to jump extra hoops here. You are welcome to do more yourself.
Let's merge this as improvement; I'll make the asciiart in a separate PR. |
…boxplot docstring
@anntzer I'm -0.1 on this because the ascii-art is only a rough visual approximation of the box and harder to read than an actual image. It's a trade-off between having the info in the ascii docstring and readability in the html output. But I won't block a PR. Note that if you do the ascii-art, you'll likely have to use some left-side character for aligning the ascii lines. ReST messes up if any line in the code block is less indented than the first line. See e.g. https://matplotlib.org/devdocs/api/_as_gen/matplotlib.axes.Axes.barbs.html |
…860-on-v3.4.x Backport PR #19860 on branch v3.4.x (Move "howto interpreting box plots" to boxplot docstring)
PR Summary
The explanation of a box plot is better placed at to the
boxplot()
function.