Manually defining boxplot width and segment values

Hi, I have 2 questions on plotly’s boxplots:

  1. Is there a way to control the box width. I know you can play with this by messing with the overall layout as in [1], but I want to overlay the boxplot on other scatter plots and thus need to control its width directly. Is this possible?

  2. Is there a way to supply the boxlpot values directly (as in its mean, median, and quartiles) rather than passing data and having plotly internally compute those values. Essentially, I want to compute a custom boxplot.



1 Like

Not directly, you can use layout.boxgap and layout.boxgroupgap to adjust their size.

Not at the moment. See Allow precomputed statistics input for box traces · Issue #1059 · plotly/plotly.js · GitHub

Thank you! More control over boxplots is definitely highly desired. I will probably have to custom make my own now with lines and shapes :frowning:


where I can find the boxgap and boxgroupgap? I tried in but couldn’t find these.

@slfan2013, did you find a way to get boxgap and boxgroupgap to work?