@@ -3463,8 +3463,8 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3463
3463
"""
3464
3464
Make a box and whisker plot.
3465
3465
3466
- Make a box and whisker plot for each column of ``x`` or each
3467
- vector in sequence ``x`` . The box extends from the lower to
3466
+ Make a box and whisker plot for each column of *x* or each
3467
+ vector in sequence *x* . The box extends from the lower to
3468
3468
upper quartile values of the data, with a line at the median.
3469
3469
The whiskers extend from the box to show the range of the
3470
3470
data. Flier points are those past the end of the whiskers.
@@ -3475,11 +3475,10 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3475
3475
The input data.
3476
3476
3477
3477
notch : bool, default: False
3478
- If `True`, will produce a notched box plot. Otherwise, a
3479
- rectangular boxplot is produced. The notches represent the
3480
- confidence interval (CI) around the median. See the entry
3481
- for the ``bootstrap`` parameter for information regarding
3482
- how the locations of the notches are computed.
3478
+ Whether to draw a noteched box plot (`True`), or a rectangular box
3479
+ plot (`False`). The notches represent the confidence interval (CI)
3480
+ around the median. The documentation for *bootstrap* describes how
3481
+ the locations of the notches are computed.
3483
3482
3484
3483
.. note::
3485
3484
@@ -3491,10 +3490,9 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3491
3490
visualization packages.
3492
3491
3493
3492
sym : str, optional
3494
- The default symbol for flier points. Enter an empty string
3495
- ('') if you don't want to show fliers. If `None`, then the
3496
- fliers default to 'b+' If you want more control use the
3497
- flierprops kwarg.
3493
+ The default symbol for flier points. An empty string ('') hides
3494
+ the fliers. If `None`, then the fliers default to 'b+'. More
3495
+ control is provided by the *flierprops* parameter.
3498
3496
3499
3497
vert : bool, default: True
3500
3498
If `True`, draws vertical boxes.
@@ -3523,7 +3521,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3523
3521
3524
3522
bootstrap : int, optional
3525
3523
Specifies whether to bootstrap the confidence intervals
3526
- around the median for notched boxplots. If `` bootstrap`` is
3524
+ around the median for notched boxplots. If * bootstrap* is
3527
3525
None, no bootstrapping is performed, and notches are
3528
3526
calculated using a Gaussian-based asymptotic approximation
3529
3527
(see McGill, R., Tukey, J.W., and Larsen, W.A., 1978, and
@@ -3533,20 +3531,17 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3533
3531
recommended.
3534
3532
3535
3533
usermedians : array-like, optional
3536
- An array or sequence whose first dimension (or length) is
3537
- compatible with ``x``. This overrides the medians computed
3538
- by matplotlib for each element of ``usermedians`` that is not
3539
- `None`. When an element of ``usermedians`` is None, the median
3540
- will be computed by matplotlib as normal.
3534
+ A 1D array-like of length ``len(x)``. Each entry that is not
3535
+ `None` forces the value of the median for the corresponding
3536
+ dataset. For entries that are `None`, the medians are computed
3537
+ by Matplotlib as normal.
3541
3538
3542
3539
conf_intervals : array-like, optional
3543
- Array or sequence whose first dimension (or length) is
3544
- compatible with ``x`` and whose second dimension is 2. When
3545
- the an element of ``conf_intervals`` is not None, the
3546
- notch locations computed by matplotlib are overridden
3547
- (provided ``notch`` is `True`). When an element of
3548
- ``conf_intervals`` is `None`, the notches are computed by the
3549
- method specified by the other kwargs (e.g., ``bootstrap``).
3540
+ A 2D array-like of shape ``(len(x), 2)``. Each entry that is not
3541
+ None forces the location of the corresponding notch (which is
3542
+ only drawn if *notch* is `True`). For entries that are `None`,
3543
+ the notches are computed by the method specified by the other
3544
+ parameters (e.g., *bootstrap*).
3550
3545
3551
3546
positions : array-like, optional
3552
3547
Sets the positions of the boxes. The ticks and limits are
@@ -3563,24 +3558,22 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3563
3558
boxes and drawn with Patch artists.
3564
3559
3565
3560
labels : sequence, optional
3566
- Labels for each dataset. Length must be compatible with
3567
- dimensions of ``x``.
3561
+ Labels for each dataset (one per dataset).
3568
3562
3569
3563
manage_ticks : bool, default: True
3570
3564
If True, the tick locations and labels will be adjusted to match
3571
3565
the boxplot positions.
3572
3566
3573
3567
autorange : bool, default: False
3574
3568
When `True` and the data are distributed such that the 25th and
3575
- 75th percentiles are equal, `` whis`` is set to (0, 100) such
3569
+ 75th percentiles are equal, * whis* is set to (0, 100) such
3576
3570
that the whisker ends are at the minimum and maximum of the data.
3577
3571
3578
3572
meanline : bool, default: False
3579
- If `True` (and ``showmeans`` is `True`), will try to render
3580
- the mean as a line spanning the full width of the box
3581
- according to ``meanprops`` (see below). Not recommended if
3582
- ``shownotches`` is also True. Otherwise, means will be shown
3583
- as points.
3573
+ If `True` (and *showmeans* is `True`), will try to render the
3574
+ mean as a line spanning the full width of the box according to
3575
+ *meanprops* (see below). Not recommended if *shownotches* is also
3576
+ True. Otherwise, means will be shown as points.
3584
3577
3585
3578
zorder : scalar, default: None
3586
3579
Sets the zorder of the boxplot.
@@ -3712,7 +3705,8 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3712
3705
if usermedians is not None :
3713
3706
if (len (np .ravel (usermedians )) != len (bxpstats ) or
3714
3707
np .shape (usermedians )[0 ] != len (bxpstats )):
3715
- raise ValueError ('usermedians length not compatible with x' )
3708
+ raise ValueError (
3709
+ "'usermedians' and 'x' have different lengths" )
3716
3710
else :
3717
3711
# reassign medians as necessary
3718
3712
for stats , med in zip (bxpstats , usermedians ):
@@ -3721,8 +3715,8 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3721
3715
3722
3716
if conf_intervals is not None :
3723
3717
if np .shape (conf_intervals )[0 ] != len (bxpstats ):
3724
- err_mess = 'conf_intervals length not compatible with x'
3725
- raise ValueError ( err_mess )
3718
+ raise ValueError (
3719
+ "'conf_intervals' and 'x' have different lengths" )
3726
3720
else :
3727
3721
for stats , ci in zip (bxpstats , conf_intervals ):
3728
3722
if ci is not None :
0 commit comments