🏥 🏭 Working on the COVID-19 response in Canada? Plotly & the Canadian government can help you and your organization. Learn more and get in touch.

Box Plot Whiskers at Percentile Level rather than 1.5 x IQR

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?


1 Like

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.

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.


1 Like

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

1 Like

+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.

1 Like

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.



I would be very interested in this upgrade of the boxplot function.
Chris, would it be possible for you to add this feature?

Thank you in advance,


Dear Chris,

I am sorry to bother you but I am very interested in creating boxplots with whiskers as percentile level rather than 1.5 times IQR. Moreover, I can see that I am not the only one interested in the potential new feature.

Would it be possible for you to consider to code this improvement in Plotly?

Many thanks in advance,