-
Notifications
You must be signed in to change notification settings - Fork 310
Description
Describe the bug
According to Box plot - Wikipedia (emphasis mine):
The whiskers must end at an observed data point, but can be defined in various ways.
In the most straightforward method, the boundary of the lower whisker is the minimum value of the data set, and the boundary of the upper whisker is the maximum value of the data set.
(snip)
Another popular choice for the boundaries of the whiskers is based on the 1.5 IQR value. From above the upper quartile (Q3), a distance of 1.5 times the IQR is measured out and a whisker is drawn up to the largest observed data point from the dataset that falls within this distance. Similarly, a distance of 1.5 times the IQR is measured out below the lower quartile (Q1) and a whisker is drawn down to the lowest observed data point from the dataset that falls within this distance. Because the whiskers must end at an observed data point, the whisker lengths can look unequal, even though 1.5 IQR is the same for both sides.
Boxplot seems not to follow this rule:
-
Actual:
Boxplotjust plots lower/upper fences. -
Expected: it should instead plot
max(min_value, lower_fence)andmin(max_value, upper_fence).
To Reproduce
The problem is reproduced by (but not limited to) the official example for boxplot.
Version Information
0.3.7