Box-Plot group - line connecting | individual traces && box-plots

Hi Team Plotly,

Thanks for the great library!

I’m working with Box-Plots and some use-cases to implement with box-plots boxmode: group , but unfortunately, not able to produce the following use-cases:

  1. Connect individual traces inside the same box-plot-group with their median values, and then connect multiple box-plot-groups with a line.
  2. Connect multiple box-plot group’s individual related traces with a line:

Here is the rough implementation, but not able to achieve it. Please help me how can i achieve these use-cases with box-plots?

Looks like, there is no option to connect individual traces with boxmode: group, two options as you mentioned on github.

  • A feature request where we would expose a way to add “connectors” to box traces?

  • Or a way to add scatter-line traces with coordinates corresponding the the box positions?


Here’s how I would do this:

In brief, I used layout shapes and dug into the graph’s calcdata (this part is a little hacky and may stop working in future plotly.js version) to determine the boxes’ positions.