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.

Thanks

[1] https://stackoverflow.com/questions/26534247/how-do-you-set-the-box-width-in-a-plotly-box-in-python

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:

Hi,

where I can find the boxgap and boxgroupgap? I tried in https://plot.ly/javascript/reference/ but couldn’t find these.

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