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

Skip to content

Commit 5443e81

Browse files
authored
Merge pull request #6703 from phobson/bxp-notch-docs
DOC: explain behavior of notches beyond quartiles
2 parents 7eab7d9 + 2b945c0 commit 5443e81

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

0 commit comments

Comments
 (0)