@@ -3536,26 +3536,38 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3536
3536
meanprops = None , capprops = None , whiskerprops = None ,
3537
3537
manage_ticks = True , autorange = False , zorder = None ):
3538
3538
"""
3539
- Make a box and whisker plot.
3539
+ Draw a box and whisker plot.
3540
+
3541
+ The box extends from the first quartile (Q1) to the third
3542
+ quartile (Q3) of the data, with a line at the median. The
3543
+ whiskers extend from the box by 1.5x the inter-quartile range
3544
+ (IQR). Flier points are those past the end of the whiskers.
3545
+ See https://en.wikipedia.org/wiki/Box_plot for reference.
3546
+
3547
+ .. code-block:: none
3548
+
3549
+ Q1-1.5IQR Q1 median Q3 Q3+1.5IQR
3550
+ |-----:-----|
3551
+ o |--------| : |--------| o o
3552
+ |-----:-----|
3553
+ flier <-----------> fliers
3554
+ IQR
3540
3555
3541
- Make a box and whisker plot for each column of *x* or each
3542
- vector in sequence *x*. The box extends from the lower to
3543
- upper quartile values of the data, with a line at the median.
3544
- The whiskers extend from the box to show the range of the
3545
- data. Flier points are those past the end of the whiskers.
3546
3556
3547
3557
Parameters
3548
3558
----------
3549
3559
x : Array or a sequence of vectors.
3550
- The input data.
3560
+ The input data. If a 2D array, a boxplot is drawn for each column
3561
+ in *x*. If a sequence of 1D arrays, a boxplot is drawn for each
3562
+ array in *x*.
3551
3563
3552
3564
notch : bool, default: False
3553
- Whether to draw a notched box plot (`True`), or a rectangular box
3554
- plot (`False`). The notches represent the confidence interval (CI)
3555
- around the median. The documentation for *bootstrap* describes how
3556
- the locations of the notches are computed by default, but their
3557
- locations may also be overridden by setting the *conf_intervals*
3558
- parameter.
3565
+ Whether to draw a notched boxplot (`True`), or a rectangular
3566
+ boxplot (`False`). The notches represent the confidence interval
3567
+ (CI) around the median. The documentation for *bootstrap*
3568
+ describes how the locations of the notches are computed by
3569
+ default, but their locations may also be overridden by setting the
3570
+ *conf_intervals* parameter.
3559
3571
3560
3572
.. note::
3561
3573
@@ -3700,28 +3712,9 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3700
3712
meanprops : dict, default: None
3701
3713
The style of the mean.
3702
3714
3703
- Notes
3704
- -----
3705
- Box plots provide insight into distribution properties of the data.
3706
- However, they can be challenging to interpret for the unfamiliar
3707
- reader. The figure below illustrates the different visual features of
3708
- a box plot.
3709
-
3710
- .. image:: /_static/boxplot_explanation.png
3711
- :alt: Illustration of box plot features
3712
- :scale: 50 %
3713
-
3714
- The whiskers mark the range of the non-outlier data. The most common
3715
- definition of non-outlier is ``[Q1 - 1.5xIQR, Q3 + 1.5xIQR]``, which
3716
- is also the default in this function. Other whisker meanings can be
3717
- applied via the *whis* parameter.
3718
-
3719
- See `Box plot <https://en.wikipedia.org/wiki/Box_plot>`_ on Wikipedia
3720
- for further information.
3721
-
3722
- Violin plots (`~.Axes.violinplot`) add even more detail about the
3723
- statistical distribution by plotting the kernel density estimation
3724
- (KDE) as an estimation of the probability density function.
3715
+ See Also
3716
+ --------
3717
+ violinplot : Draw an estimate of the probability density function.
3725
3718
"""
3726
3719
3727
3720
# Missing arguments default to rcParams.
0 commit comments