@@ -3550,26 +3550,38 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3550
3550
meanprops = None , capprops = None , whiskerprops = None ,
3551
3551
manage_ticks = True , autorange = False , zorder = None ):
3552
3552
"""
3553
- Make a box and whisker plot.
3553
+ Draw a box and whisker plot.
3554
+
3555
+ The box extends from the first quartile (Q1) to the third
3556
+ quartile (Q3) of the data, with a line at the median. The
3557
+ whiskers extend from the box by 1.5x the inter-quartile range
3558
+ (IQR). Flier points are those past the end of the whiskers.
3559
+ See https://en.wikipedia.org/wiki/Box_plot for reference.
3560
+
3561
+ .. code-block:: none
3562
+
3563
+ Q1-1.5IQR Q1 median Q3 Q3+1.5IQR
3564
+ |-----:-----|
3565
+ o |--------| : |--------| o o
3566
+ |-----:-----|
3567
+ flier <-----------> fliers
3568
+ IQR
3554
3569
3555
- Make a box and whisker plot for each column of *x* or each
3556
- vector in sequence *x*. The box extends from the lower to
3557
- upper quartile values of the data, with a line at the median.
3558
- The whiskers extend from the box to show the range of the
3559
- data. Flier points are those past the end of the whiskers.
3560
3570
3561
3571
Parameters
3562
3572
----------
3563
3573
x : Array or a sequence of vectors.
3564
- The input data.
3574
+ The input data. If a 2D array, a boxplot is drawn for each column
3575
+ in *x*. If a sequence of 1D arrays, a boxplot is drawn for each
3576
+ array in *x*.
3565
3577
3566
3578
notch : bool, default: False
3567
- Whether to draw a notched box plot (`True`), or a rectangular box
3568
- plot (`False`). The notches represent the confidence interval (CI)
3569
- around the median. The documentation for *bootstrap* describes how
3570
- the locations of the notches are computed by default, but their
3571
- locations may also be overridden by setting the *conf_intervals*
3572
- parameter.
3579
+ Whether to draw a notched boxplot (`True`), or a rectangular
3580
+ boxplot (`False`). The notches represent the confidence interval
3581
+ (CI) around the median. The documentation for *bootstrap*
3582
+ describes how the locations of the notches are computed by
3583
+ default, but their locations may also be overridden by setting the
3584
+ *conf_intervals* parameter.
3573
3585
3574
3586
.. note::
3575
3587
@@ -3714,28 +3726,9 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3714
3726
meanprops : dict, default: None
3715
3727
The style of the mean.
3716
3728
3717
- Notes
3718
- -----
3719
- Box plots provide insight into distribution properties of the data.
3720
- 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.
3723
-
3724
- .. image:: /_static/boxplot_explanation.png
3725
- :alt: Illustration of box plot features
3726
- :scale: 50 %
3727
-
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.
3732
-
3733
- See `Box plot <https://en.wikipedia.org/wiki/Box_plot>`_ on Wikipedia
3734
- for further information.
3735
-
3736
- Violin plots (`~.Axes.violinplot`) add even more detail about the
3737
- statistical distribution by plotting the kernel density estimation
3738
- (KDE) as an estimation of the probability density function.
3729
+ See Also
3730
+ --------
3731
+ violinplot : Draw an estimate of the probability density function.
3739
3732
"""
3740
3733
3741
3734
# Missing arguments default to rcParams.
0 commit comments