Skip to content

Commit 0926d7d

Browse files
committed
Switch to asciiart for boxplot illustration.
This makes the information also available at the terminal.
1 parent fb0c10d commit 0926d7d

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

doc/_static/boxplot_explanation.png

-238 KB
Binary file not shown.

lib/matplotlib/axes/_axes.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3718,17 +3718,25 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
37183718
-----
37193719
Box plots provide insight into distribution properties of the data.
37203720
However, they can be challenging to interpret for the unfamiliar
3721-
reader. The figure below illustrates the different visual features of
3722-
a box plot.
3721+
reader. The visual features of a box plot are illustred below:
37233722
3724-
.. image:: /_static/boxplot_explanation.png
3725-
:alt: Illustration of box plot features
3726-
:scale: 50 %
3723+
.. code-block:: none
37273724
3728-
The whiskers mark the range of the non-outlier data. The most common
3729-
definition of non-outlier is ``[Q1 - 1.5xIQR, Q3 + 1.5xIQR]``, which
3730-
is also the default in this function. Other whisker meanings can be
3731-
applied via the *whis* parameter.
3725+
Q1-1.5IQR Q1 median Q3 Q3+1.5IQR
3726+
|-----:-----|
3727+
. |--------| : |--------| . .
3728+
|-----:-----|
3729+
outlier <-----------> outliers
3730+
IQR
3731+
3732+
``Q1`` and ``Q3`` are the first and third quartile: 25% of the points
3733+
fall below ``Q1``, and 75% of the points below ``Q3``.
3734+
3735+
The whiskers mark the range of non-outlier data. The most common
3736+
definition of non-outlier is ``[Q1 - 1.5xIQR, Q3 + 1.5xIQR]``, where
3737+
``IQR = Q3 - Q1`` is the interquartile range. This definition is also
3738+
the one used by default in this function. Other whisker definitions
3739+
can be selected via the *whis* parameter.
37323740
37333741
See `Box plot <https://en.wikipedia.org/wiki/Box_plot>`_ on Wikipedia
37343742
for further information.

0 commit comments

Comments
 (0)