It seems that sharing the x-axis breaks down when using a more complicated subplot layout. I noticed it in my plot and replicated it in the example from the documentation. I am using the newest version of plotly (4.9.0) but also noticed it in 4.8.1.
Standalone example:
fig = make_subplots(rows=2, cols=4, shared_xaxes=True,
specs=[[{"rowspan": 2, "colspan": 2}, None, {"colspan": 2}, None],[None, None, {"colspan": 2}, None]])
fig.add_trace(go.Scatter(x=[0, 1, 2], y=[10, 11, 12]),
row=1, col=1)
fig.add_trace(go.Scatter(x=[2, 3, 4], y=[100, 110, 120]),
row=1, col=3)
fig.add_trace(go.Scatter(x=[3, 4, 5], y=[1000, 1100, 1200]),
row=2, col=3)
fig.update_layout(height=600, width=600,
title_text="Stacked Subplots with Shared X-Axes")
fig.show()
Expected behaviour: Shared x-axes across all subplots or across columns when using 'columns' instead of True.
It seems that sharing the x-axis breaks down when using a more complicated subplot layout. I noticed it in my plot and replicated it in the example from the documentation. I am using the newest version of plotly (4.9.0) but also noticed it in 4.8.1.
Standalone example:
Expected behaviour: Shared x-axes across all subplots or across columns when using 'columns' instead of True.