How to Add a mean line on a box plot

Hi,

I would like to add a mean line or point on my box plot. Is there a possible means of replacing median with mean?

Thanks in advance

Hi @Jason4,

You can use the boxmean property to add the mean as a dashed line. See https://plot.ly/python/box-plots/#box-plot-styling-mean--standard-deviation. I don’t think it’s possible to replace the solid median line with the mean though.

Hope that helps,
-Jon

1 Like