-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Conversation
Current coverage is 62.12% (diff: 100%)@@ master #7753 diff @@
==========================================
Files 174 174
Lines 56028 56028
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 34805 34805
Misses 21223 21223
Partials 0 0
|
As a float, determines the reach of the whiskers to the first | ||
(resp. last) datum past the first (resp. third) quartiles | ||
(e.g., Q3 + whis*IQR, IQR = interquartile range, Q3-Q1, | ||
whisker will be at the last data point of Q3 + whis*IQR). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"will be at last data point less than Q3 + whis*IQR."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to your wording.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(in both docstrings)
a7b04b1
to
8e96d30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is headed in the right direction. I would recommend:
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 thanQ3 + whis*IQR
). Similarly, the lower whisker will extend to the first datum greater thanQ1 - whis*IQR
.
FWIW, wikipedia currently explains this as:
I think that would work as well (with attribution) |
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.
8e96d30
to
97609a8
Compare
@phobson pushed with your first phrasing. I find it clearer than the wikipedia one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The failure is unrelated to the patch, so I'm merging. |
Backported to |
Clarify the uses of whiskers float parameter.
Thanks. Just a question: Isn't that a bit overkill for a patch release ? For a 2.x I would have understood, even if I believe this would not fit a backport to a minor in IPython. Or I'm misinterpreting the numbering of matplotlib. |
I'm just going by the milestone, but documentation corrections are generally safe to backport. |
Yes, I understand that, and thanks for doing it.
That's not a question of "safety", it's also a question of maintainer time and message to the community. Typically #7766 was deprecation warnings, was it really worth backporting ? Or is #7913 (quiver docs and example), which for me just an addition (and a carrot to upgrade on 2.1) if it had been only on 2.1 I just don't want to guys to burnout by doing too much. |
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:
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.
Improvement thanks to @emilienschultz, but I already had a matplotlib clone and a dev install, so it was faster for me to fix it.