-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
make_subplots(row_width=[]) is parsed in the 'wrong' order #1275
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
Comments
Thanks for the report @EBoisseauSierra , For sake of discussion, here's the current behavior of the general 2D case where from plotly import tools
import plotly.plotly as py
import plotly.graph_objs as go
trace1 = go.Scatter(
x=[3, 4, 5],
y=[1000, 1100, 1200],
)
trace3 = go.Scatter(
x=[0, 1, 2],
y=[10, 11, 12]
)
trace2 = go.Scatter(
x=[2, 3, 4],
y=[100, 110, 120],
)
fig = tools.make_subplots(
rows=3,
cols=2,
shared_xaxes=True,
vertical_spacing=0.1,
subplot_titles=('subtitle 1', 'subtitle 2', 'subtitle 3',
'subtitle 4', 'subtitle 5', 'subtitle 6'),
row_width=[2, 1, 1],
column_width=[2, 1]
)
fig.append_trace(trace1, 1, 1)
fig.append_trace(trace2, 2, 1)
fig.append_trace(trace3, 3, 1)
fig.append_trace(trace1, 1, 2)
fig.append_trace(trace2, 2, 2)
fig.append_trace(trace3, 3, 2)
fig['layout'].update(height=600, width=800, title='Subplots with Shared X-Axes')
go.FigureWidget(fig) So what's happening is that the I agree that this is a bit of an inconsistent state of affairs, but it's worked this way for a long time so I don't think we should change the default before the next major version bump (version 4). I'm going to tag this as Does that sound reasonable? |
I now better understand how it worked, and get why it wasn't really a "bug". Anyway, I totally get your point — backward compatibility is a big issue. I have no problem waiting for versions Thanks a lot for responsiveness… and plotly! |
Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our backlog. Thanks for your help - @gvwilson |
Imagine have 3 subplots stacked one above the other. I want the first (i.e. the top one) to have its height twice as big as the others.
So after I have set:
… I intuitively set (thanks to @Kully 's previous PR):
However, this makes the 3rd graph (i.e. the "first… from last") have its height twice as big as the others:
I believe that
row_width
is parsed in the wrong direction.MWE
The text was updated successfully, but these errors were encountered: