-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
Hi,
i am trying to create subplots with colspan/rowspan attribute and shared_xaxes using the code below (Plotly 3.3). As soon as i use the shared_xaxes=True parameter, the code fails with the error message:
Exception: Something went wrong. An axis object for (2,4) subplot cell got deleted.
Example code:
from plotly import tools
import plotly
import plotly.plotly as py
import plotly.graph_objs as go
trace1 = go.Scatter(
x=[0, 1, 2],
y=[10, 11, 12]
)
trace2 = go.Scatter(
x=[2, 3, 4],
y=[100, 110, 120],
)
trace3 = go.Scatter(
x=[2, 3, 4],
y=[100, 110, 120],
)
fig = tools.make_subplots(rows=3, cols=4, specs=[[{'colspan':3}, None, None, None],
[{'rowspan':2, 'colspan':3}, None, None, {'rowspan':2}],
[None, None, None, None]],
shared_xaxes=True, shared_yaxes=True,
vertical_spacing=0.001)
print(fig['layout'])
fig.append_trace(trace1, 1, 1)
fig.append_trace(trace2, 2, 1)
fig.append_trace(trace3, 2, 4)
print(fig['layout'])
fig['layout'].update(height=600, width=600, title='Stacked Subplots with Shared X-Axes')
plotly.offline.iplot(fig, filename='test')
Cheers,
Georg
Metadata
Metadata
Assignees
Labels
No labels