Move "howto interpreting box plots" to boxplot docstring#19860
Move "howto interpreting box plots" to boxplot docstring#19860anntzer merged 1 commit intomatplotlib:masterfrom
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.
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.
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.