8000 DOC: explain behavior of notches beyond quartiles · matplotlib/matplotlib@2b945c0 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2b945c0

Browse files
committed
DOC: explain behavior of notches beyond quartiles
1 parent 94f2fb8 commit 2b945c0

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3098,7 +3098,19 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
30983098
30993099
notch : bool, optional (False)
31003100
If `True`, will produce a notched box plot. Otherwise, a
3101-
rectangular boxplot is produced.
3101+
rectangular boxplot is produced. The notches represent the
3102+
confidence interval (CI) around the median. See the entry
3103+
for the ``bootstrap`` parameter for information regarding
3104+
how the locations of the notches are computed.
3105+
3106+
.. note::
3107+
3108+
In cases where the values of the CI are less than the
3109+
lower quartile or greater than the upper quartile, the
3110+
notches will extend beyond the box, giving it a
3111+
distinctive "flipped" appearance. This is expected
3112+
behavior and consistent with other statistical
3113+
visualization packages.
31023114
31033115
sym : str, optional
31043116
The default symbol for flier points. Enter an empty string
@@ -3124,13 +3136,13 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
31243136
31253137
bootstrap : int, optional
31263138
Specifies whether to bootstrap the confidence intervals
3127-
around the median for notched boxplots. If `bootstrap` is None,
3128-
no bootstrapping is performed, and notches are calculated
3129-
using a Gaussian-based asymptotic approximation (see McGill,
3130-
R., Tukey, J.W., and Larsen, W.A., 1978, and Kendall and
3131-
Stuart, 1967). Otherwise, bootstrap specifies the number of
3132-
times to bootstrap the median to determine its 95%
3133-
confidence intervals. Values between 1000 and 10000 are
3139+
around the median for notched boxplots. If ``bootstrap`` is
3140+
None, no bootstrapping is performed, and notches are
3141+
calculated using a Gaussian-based asymptotic approximation
3142+
(see McGill, R., Tukey, J.W., and Larsen, W.A., 1978, and
3143+
Kendall and Stuart, 1967). Otherwise, bootstrap specifies
3144+
the number of times to bootstrap the median to determine its
3145+
95% confidence intervals. Values between 1000 and 10000 are
31343146
recommended.
31353147
31363148
usermedians : array-like, optional

0 commit comments

Comments
 (0)
0