8000 Merge pull request #20513 from anntzer/bxpd · matplotlib/matplotlib@bfd3b4e · GitHub
[go: up one dir, main page]

Skip to content

Commit bfd3b4e

Browse files
authored
Merge pull request #20513 from anntzer/bxpd
Shorten the bxp docstring.
2 parents d385b2c + 3961475 commit bfd3b4e

File tree

1 file changed

+26
-75
lines changed

1 file changed

+26
-75
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 26 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -3835,85 +3835,45 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
38353835
A list of dictionaries containing stats for each boxplot.
38363836
Required keys are:
38373837
3838-
- ``med``: The median (scalar float).
3839-
3840-
- ``q1``: The first quartile (25th percentile) (scalar
3841-
float).
3842-
3843-
- ``q3``: The third quartile (75th percentile) (scalar
3844-
float).
3845-
3846-
- ``whislo``: Lower bound of the lower whisker (scalar
3847-
float).
3848-
3849-
- ``whishi``: Upper bound of the upper whisker (scalar
3850-
float).
3838+
- ``med``: Median (scalar).
3839+
- ``q1``, ``q3``: First & third quartiles (scalars).
3840+
- ``whislo``, ``whishi``: Lower & upper whisker positions (scalars).
38513841
38523842
Optional keys are:
38533843
3854-
- ``mean``: The mean (scalar float). Needed if
3855-
``showmeans=True``.
3856-
3857-
- ``fliers``: Data beyond the whiskers (sequence of floats).
3844+
- ``mean``: Mean (scalar). Needed if ``showmeans=True``.
3845+
- ``fliers``: Data beyond the whiskers (array-like).
38583846
Needed if ``showfliers=True``.
3859-
3860-
- ``cilo`` & ``cihi``: Lower and upper confidence intervals
3847+
- ``cilo``, ``cihi``: Lower & upper confidence intervals
38613848
about the median. Needed if ``shownotches=True``.
3862-
3863-
- ``label``: Name of the dataset (string). If available,
3849+
- ``label``: Name of the dataset (str). If available,
38643850
this will be used a tick label for the boxplot
38653851
38663852
positions : array-like, default: [1, 2, ..., n]
38673853
The positions of the boxes. The ticks and limits
38683854
are automatically set to match the positions.
38693855
3870-
widths : array-like, default: None
3871-
Either a scalar or a vector and sets the width of each
3872-
box. The default is ``0.15*(distance between extreme
3873-
positions)``, clipped to no less than 0.15 and no more than
3874-
0.5.
3856+
widths : float or array-like, default: None
3857+
The widths of the boxes. The default is
3858+
``clip(0.15*(distance between extreme positions), 0.15, 0.5)``.
38753859
38763860
vert : bool, default: True
3877-
If `True` (default), makes the boxes vertical. If `False`,
3878-
makes horizontal boxes.
3861+
If `True` (default), makes the boxes vertical.
3862+
If `False`, makes horizontal boxes.
38793863
38803864
patch_artist : bool, default: False
38813865
If `False` produces boxes with the `.Line2D` artist.
38823866
If `True` produces boxes with the `~matplotlib.patches.Patch` artist.
38833867
3884-
shownotches : bool, default: False
3885-
If `False` (default), produces a rectangular box plot.
3886-
If `True`, will produce a notched box plot
3887-
3888-
showmeans : bool, default: False
3889-
If `True`, will toggle on the rendering of the means
3890-
3891-
showcaps : bool, default: True
3892-
If `True`, will toggle on the rendering of the caps
3893-
3894-
showbox : bool, default: True
3895-
If `True`, will toggle on the rendering of the box
3896-
3897-
showfliers : bool, default: True
3898-
If `True`, will toggle on the rendering of the fliers
3899-
3900-
boxprops : dict or None (default)
3901-
If provided, will set the plotting style of the boxes
3902-
3903-
whiskerprops : dict or None (default)
3904-
If provided, will set the plotting style of the whiskers
3905-
3906-
capprops : dict or None (default)
3907-
If provided, will set the plotting style of the caps
3908-
3909-
flierprops : dict or None (default)
3910-
If provided will set the plotting style of the fliers
3868+
shownotches, showmeans, showcaps, showbox, showfliers : bool
3869+
Whether to draw the CI notches, the mean value (both default to
3870+
False), the caps, the box, and the fliers (all three default to
3871+
True).
39113872
3912-
medianprops : dict or None (default)
3913-
If provided, will set the plotting style of the medians
3914-
3915-
meanprops : dict or None (default)
3916-
If provided, will set the plotting style of the means
3873+
boxprops, whiskerprops, capprops, flierprops, medianprops, meanprops :\
3874+
dict, optional
3875+
Artist properties for the boxes, whiskers, caps, fliers, medians, and
3876+
means.
39173877
39183878
meanline : bool, default: False
39193879
If `True` (and *showmeans* is `True`), will try to render the mean
@@ -3935,28 +3895,19 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
39353895
of the `.Line2D` instances created. That dictionary has the
39363896
following keys (assuming vertical boxplots):
39373897
3938-
- ``boxes``: the main body of the boxplot showing the
3939-
quartiles and the median's confidence intervals if
3940-
enabled.
3941-
3898+
- ``boxes``: main bodies of the boxplot showing the quartiles, and
3899+
the median's confidence intervals if enabled.
39423900
- ``medians``: horizontal lines at the median of each box.
3943-
3944-
- ``whiskers``: the vertical lines extending to the most
3945-
extreme, non-outlier data points.
3946-
3947-
- ``caps``: the horizontal lines at the ends of the
3948-
whiskers.
3949-
3950-
- ``fliers``: points representing data that extend beyond
3951-
the whiskers (fliers).
3952-
3901+
- ``whiskers``: vertical lines up to the last non-outlier data.
3902+
- ``caps``: horizontal lines at the ends of the whiskers.
3903+
- ``fliers``: points representing data beyond the whiskers (fliers).
39533904
- ``means``: points or lines representing the means.
39543905
39553906
Examples
39563907
--------
39573908
.. plot:: gallery/statistics/bxp.py
3958-
39593 4E6B 909
"""
3910+
39603911
# lists of artists to be output
39613912
whiskers = []
39623913
caps = []

0 commit comments

Comments
 (0)
0