10000 Merge pull request #7753 from Carreau/improve-whiskers-docstrings · matplotlib/matplotlib@f12fa6e · GitHub
[go: up one dir, main page]

Skip to content

Commit f12fa6e

Browse files
NelleVQuLogic
authored andcommitted
Merge pull request #7753 from Carreau/improve-whiskers-docstrings
Clarify the uses of whiskers float parameter.
1 parent c1a3702 commit f12fa6e

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3129,9 +3129,12 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
31293129
everything is drawn horizontally.
31303130
31313131
whis : float, sequence, or string (default = 1.5)
3132-
As a float, determines the reach of the whiskers past the
3133-
first and third quartiles (e.g., Q3 + whis*IQR,
3134-
IQR = interquartile range, Q3-Q1). Beyond the whiskers, data
3132+
As a float, determines the reach of the whiskers to the beyond the
3133+
first and third quartiles. In other words, where IQR is the
3134+
interquartile range (`Q3-Q1`), the upper whisker will extend to
3135+
last datum less than `Q3 + whis*IQR`). Similarly, the lower whisker
3136+
will extend to the first datum greater than `Q1 - whis*IQR`.
3137+
Beyond the whiskers, data
31353138
are considered outliers and are plotted as individual
31363139
points. Set this to an unreasonably high value to force the
31373140
whiskers to show the min and max values. Alternatively, set

lib/matplotlib/cbook.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,9 +1896,12 @@ def boxplot_stats(X, whis=1.5, bootstrap=None, labels=None,
18961896
fewer dimensions.
18971897
18981898
whis : float, string, or sequence (default = 1.5)
1899-
As a float, determines the reach of the whiskers past the first
1900-
and third quartiles (e.g., Q3 + whis*IQR, QR = interquartile
1901-
range, Q3-Q1). Beyond the whiskers, data are considered outliers
1899+
As a float, determines the reach of the whiskers to the beyond the
1900+
first and third quartiles. In other words, where IQR is the
1901+
interquartile range (`Q3-Q1`), the upper whisker will extend to last
1902+
datum less than `Q3 + whis*IQR`). Similarly, the lower whisker will
1903+
extend to the first datum greater than `Q1 - whis*IQR`.
1904+
Beyond the whiskers, data are considered outliers
19021905
and are plotted as individual points. This can be set this to an
19031906
ascending sequence of percentile (e.g., [5, 95]) to set the
19041907
whiskers at specific percentiles of the data. Finally, `whis`

0 commit comments

Comments
 (0)
0