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
Merged

Conversation

justinbois
Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

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 holoviz:master Jun 25, 2019
@justinbois
Copy link
Contributor Author

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.

Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants