-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
Description
When plotting multiple box plot traces with boxmode="group"
in a figure with multiple subplots, the traces are offset based on all subplots. This happens even if shared_xaxes=False
and shared_yaxes=False
.
Expected behaviour
The boxes are offset only if multiple traces are plotted in the same subplot. I'd expect the top left subplot to always look like in the last part of the image below.
To reproduce
import plotly.graph_objects as go
from plotly.subplots import make_subplots
x = [0,0]
y1 = [1,2]
y2 = [1,2]
figure = make_subplots(rows=2,cols=2)
figure.add_trace(go.Box(x=x,y=y1),row=1,col=1)
figure.add_trace(go.Box(x=x,y=y1),row=2,col=1)
figure.add_trace(go.Box(x=x,y=y2),row=1,col=2)
figure.add_trace(go.Box(x=x,y=y2),row=1,col=1)
figure.update_layout(boxmode="group")
figure.show()
Additional Context
Plotly 5.14.1
Python 3.11.1
Windows
Metadata
Metadata
Assignees
Labels
No labels