Box Plot Whiskers at Percentile Level rather than 1.5 x IQR


#1

Hi, I’ve searched through all the plotly documentation I can find on box plots, there’s lots of options for styling/layout etc. but I can’t see anything to change the whiskers level from the default (whiskers at 1.5 x IQR above and below Q1 and Q3, I would like the whiskers to be plotted at the 95th percentile level with points above this being shown as outliers, does anyone know if this is possible?

Shaun


#2

Hey @shaunsweeney
This isn’t possible right now. I’m a little hesitant to add a feature like this because I think that all box-plots should have a standard meaning and interpretation.


#3

Hi @chriddyp,

Cool I get that as it would make lot more sense if that was the case. I think this isn’t actually the case though with a lot of box plots, these are IPCC ones using whiskers at 5th/95th percentile:
Fig 1.1c here - box plot on page 9, description of whiskers levels on page 10
Fig 2 page 43 here

And the wikipedia page suggests there can be a few different types of box plot too:
[Wikipedia page][3]

I would even suggest that the 90th/95th percentile would be a better way to go, I’ve always found the 1.5 x IQR / Tukey box plot more difficult to interpret.

Shaun


#4

I’m also looking to put whiskers representing 90th percentile on my graphs.


#5

+1 Exact same need. In R ggplot2 a function can be provided as parameter, returning the limits of box and whisker. Something similar would be very useful to my opinion.


#6

Apologies for posting to an old thread, but also looking for that feature here.

It’s fairly standard practice to use the 95th/5th percentile on box and whisker plots in my field. Identifying data points of interest by looking for things that fall outside of 2 standard deviations (95% to 5% for normally distributed data) is widely used. It’s also statistically more solid as a cutoff for outliers than a somewhat arbitrary 1.5 x IQR measure.