Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 14192ca

Browse files
committed
DOC: boxplot typos and clarification
1 parent e4634bc commit 14192ca

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

lib/matplotlib/axes/_axes.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3068,8 +3068,8 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
30683068
meanprops=None, capprops=None, whiskerprops=None,
30693069
manage_xticks=True, autorange=False):
30703070
3071-
Make a box and whisker plot for each column of *x* or each
3072-
vector in sequence *x*. The box extends from the lower to
3071+
Make a box and whisker plot for each column of ``x`` or each
3072+
vector in sequence ``x``. The box extends from the lower to
30733073
upper quartile values of the data, with a line at the median.
30743074
The whiskers extend from the box to show the range of the
30753075
data. Flier points are those past the end of the whiskers.
@@ -3099,12 +3099,10 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
30993099
this to an ascending sequence of percentile (e.g., [5, 95])
31003100
to set the whiskers at specific percentiles of the data.
31013101
Finally, ``whis`` can be the string ``'range'`` to force the
3102-
whiskers to the min and max of the data. In the edge case
3103-
that the 25th and 75th percentiles are equivalent, *whis*
3104-
will be automatically set to ``'range'``.
3102+
whiskers to the min and max of the data.
31053103
bootstrap : int, optional
31063104
Specifies whether to bootstrap the confidence intervals
3107-
around the median for notched boxplots. If bootstrap==None,
3105+
around the median for notched boxplots. If `bootstrap` is None,
31083106
no bootstrapping is performed, and notches are calculated
31093107
using a Gaussian-based asymptotic approximation (see McGill,
31103108
R., Tukey, J.W., and Larsen, W.A., 1978, and Kendall and
@@ -3115,13 +3113,13 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
31153113
usermedians : array-like, optional
31163114
An array or sequence whose first dimension (or length) is
31173115
compatible with ``x``. This overrides the medians computed
3118-
by matplotlib for each element of *usermedians* that is not
3119-
`None`. When an element of *usermedians* == None, the median
3116+
by matplotlib for each element of ``usermedians`` that is not
3117+
`None`. When an element of ``usermedians`` is None, the median
31203118
will be computed by matplotlib as normal.
31213119
conf_intervals : array-like, optional
31223120
Array or sequence whose first dimension (or length) is
31233121
compatible with ``x`` and whose second dimension is 2. When
3124-
the current element of ``conf_intervals`` is not None, the
3122+
the an element of ``conf_intervals`` is not None, the
31253123
notch locations computed by matplotlib are overridden
31263124
(provided ``notch`` is `True`). When an element of
31273125
``conf_intervals`` is `None`, the notches are computed by the
@@ -3156,12 +3154,12 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
31563154
31573155
Additional Options
31583156
---------------------
3159-
The following boolean options toogle the drawing of individual
3157+
The following boolean options toggle the drawing of individual
31603158
components of the boxplots:
31613159
- showcaps: the caps on the ends of whiskers
31623160
(default is True)
31633161
- showbox: the central box (default is True)
3164-
- showfliers: the outlierd beyone the caps (default is True)
3162+
- showfliers: the outliers beyond the caps (default is True)
31653163
- showmeans: the arithmetic means (default is False)
31663164
31673165
The remaining options can accept dictionaries that specify the
@@ -3185,7 +3183,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
31853183
and the median's confidence intervals if enabled.
31863184
- medians: horizonal lines at the median of each box.
31873185
- whiskers: the vertical lines extending to the most extreme,
3188-
n-outlier data points.
3186+
non-outlier data points.
31893187
- caps: the horizontal lines at the ends of the whiskers.
31903188
- fliers: points representing data that extend beyond the
31913189
whiskers (outliers).

lib/matplotlib/cbook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,7 @@ def boxplot_stats(X, whis=1.5, autorange=False, bootstrap=None,
17641764
labels=None):
17651765
"""
17661766
Returns list of dictionaries of statistics used to draw a series
1767-
of box and whisker plots. See the `Returns` section below to the
1767+
of box and whisker plots. The `Returns` section enumerates the
17681768
required keys of the dictionary. Users can skip this function and
17691769
pass a user-defined set of dictionaries to the new `axes.bxp` method
17701770
instead of relying on MPL to do the calculations.

0 commit comments

Comments
 (0)