I’m trying to use scatter trace in combination with box trace in order to work around the current limitation that doesn’t allow me to control individual marker colors when displaying all boxpoints in the chart. I’m going for effect equivalent to pointpos
: -2, jitter
: 1, ie. having the individual markers between the box plots and the values scattered randomly to avoid overlaps.
I got stuck because the mixed traces interact strangely with the y axis.
See codepen: https://codepen.io/palimondo/pen/JpobKe?editors=0010
There are 3 traces: traceBoxplotAll
, traceBoxplotIQR
and traceBoxpointsScatter
.
The order in which they are added matter to the results, but is also mostly unstable. I can mix 2 of them, but adding a 3rd always messes things up in a different way. I wanted to still use traceBoxplotAll
(but with transparent points) so that I can get proper spacing between series.
I have also tried setting x
on the box plots, but it didn’t work. It seems like box plot switches the y axis into some special mode where each trace gets incremented integer index (this is visible when you comment out tickvals
and ticktext
), but box consecutive box plots get to share same index.
Is there a way around this?