Skip to content

Shared x-axis does not work when using grid layout #2705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
CYHSM opened this issue Aug 13, 2020 · 0 comments
Open

Shared x-axis does not work when using grid layout #2705

CYHSM opened this issue Aug 13, 2020 · 0 comments
Labels
bug something broken P3 backlog

Comments

@CYHSM
Copy link

CYHSM commented Aug 13, 2020

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.

@gvwilson gvwilson self-assigned this Jun 18, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added P3 backlog bug something broken labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

2 participants