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

Clarify the uses of whiskers float parameter. #7753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Clarify the uses of whiskers float parameter.
It is not clear (at least to a couple of non-native English speakers)
that the whiskers extend to the last data point. More precisely:

> "If it's 1.5 times Q3-Q1 it should be symmetric"

The code does seem to limit the whisker to the last data point, and that
correspond to one of the usage of whiskers described by Wikipedia.

So fix docstrings.
  • Loading branch information
Carreau committed Jan 12, 2017
commit 97609a8f6c84d0ab42f47943769d9ea89cc530b3
9 changes: 6 additions & 3 deletions 9 lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3126,9 +3126,12 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
everything is drawn horizontally.

whis : float, sequence, or string (default = 1.5)
As a float, determines the reach of the whiskers past the
first and third quartiles (e.g., Q3 + whis*IQR,
IQR = interquartile range, Q3-Q1). Beyond the whiskers, data
As a float, determines the reach of the whiskers to the beyond the
first and third quartiles. In other words, where IQR is the
interquartile range (`Q3-Q1`), the upper whisker will extend to
last datum less than `Q3 + whis*IQR`). Similarly, the lower whisker
will extend to the first datum greater than `Q1 - whis*IQR`.
Beyond the whiskers, data
are considered outliers and are plotted as individual
points. Set this to an unreasonably high value to force the
whiskers to show the min and max values. Alternatively, set
Expand Down
9 changes: 6 additions & 3 deletions 9 lib/matplotlib/cbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -1872,9 +1872,12 @@ def boxplot_stats(X, whis=1.5, bootstrap=None, labels=None,
fewer dimensions.

whis : float, string, or sequence (default = 1.5)
As a float, determines the reach of the whiskers past the first
and third quartiles (e.g., Q3 + whis*IQR, QR = interquartile
range, Q3-Q1). Beyond the whiskers, data are considered outliers
As a float, determines the reach of the whiskers to the beyond the
first and third quartiles. In other words, where IQR is the
interquartile range (`Q3-Q1`), the upper whisker will extend to last
datum less than `Q3 + whis*IQR`). Similarly, the lower whisker will
extend to the first datum greater than `Q1 - whis*IQR`.
Beyond the whiskers, data are considered outliers
and are plotted as individual points. This can be set this to an
ascending sequence of percentile (e.g., [5, 95]) to set the
whiskers at specific percentiles of the data. Finally, `whis`
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.