Skip to content
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

Updated definition of box plot whiskers to match convention for Bokeh plots. #3755

Merged
merged 2 commits into from Jun 25, 2019

Conversation

@justinbois
Copy link
Contributor

commented Jun 4, 2019

In #1926, I suggested using a definition of the whiskers length in box plots as follows:

The top whisker extends 1.5 times the IQR beyond the top of the box or to the maximal data point, whichever is smaller. An analogous definition holds for the bottom whisker. This is how the whisker is defined in some places, e.g., here.

A vastly more widely adapted version uses this definition:
The top whisker extends to the maximum of the set of data points that are less than 1.5 times the IQR beyond the top of the box, with an analogous definition for the lower whisker.

This is what the HoloViews docs say. This PR brings the Bokeh rendering of box and whisker plots.

My apologies for the confusion with #1926.

@philippjfr

This comment has been minimized.

Copy link
Contributor

commented Jun 21, 2019

Thanks @justinbois. Just to confirm, do you know which definition the inbuilt boxplot in matplotlib uses and whether that matches what you have done here?

@philippjfr

This comment has been minimized.

Copy link
Contributor

commented Jun 25, 2019

Here is the matplotlib definition:

whis : float, sequence, or string (default = 1.5)
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 + whisIQR). Similarly, the lower whisker will extend to the first datum greater than Q1 - whisIQR

Which reads to me to be identical to the definition you implemented here. I'll merge.

@philippjfr philippjfr merged commit f9e7740 into pyviz:master Jun 25, 2019

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 87.746%
Details
@justinbois

This comment has been minimized.

Copy link
Contributor Author

commented Jun 25, 2019

Thanks, @philippjfr , and sorry for the delay (been sick for the past several days). That definition also matches what is in the more general HoloViews docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.