Finding code that calculates quartiles for box plots


I would like to add a new feature to Plotly which is that the box plot instead of being around quartiles it is around standard deviation.
In particular I need to recreate a feature that Tableau has, which is plotting all the points and behind the points showing a rectangle of 3-sigma. So that each point falling out of tolerance can be easily identified.

Box plots can show std deviation today, but tbh it’s not acceptable. I can explain more if needed.

Where are the quartiles calculated, and how did you find that code? I’ve searched a lot, and tried chatGPT.
I code a lot but am new to open-source.


Maybe you can combine a Violin/Strip plot with error bars from a scatter? Calculate 3*stdev beforehand.

Violin plots in Python (

Error bars in Python (

No, because once you’re using plotly express to create a 4x4 grid of graphs, with 4 different colors, then adding plots together has to be done manually.
It’d be quicker for me to contribute to plotly than to write all that code by hand