Skip to content

PX fixedrange=True overrides matching yaxis in facets #2673

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

Closed
hbaniecki opened this issue Jul 29, 2020 · 6 comments
Closed

PX fixedrange=True overrides matching yaxis in facets #2673

hbaniecki opened this issue Jul 29, 2020 · 6 comments

Comments

@hbaniecki
Copy link

hbaniecki commented Jul 29, 2020

Is this intentional? If so, how can i preserve matching yaxis?

import plotly.express as px
df = px.data.tips()
fig = px.scatter(df, x="total_bill", y="tip", color='sex', facet_col="day", facet_col_wrap=2)
fig.show()                                         # one yaxis for all facets

fig.update_yaxes(fixedrange=True) # yaxis changes

Edit: code, plots are the same

@nicolaskruchten
Copy link
Contributor

In this context, fixedrange means "prevent panning and zooming", so in this case the matching still works: you can't pan or zoom any of the plots in the Y direction.

@hbaniecki
Copy link
Author

hbaniecki commented Aug 11, 2020

@nicolaskruchten I dont understand, how is the matching working? I get different yaxis for every facet.
image

@nicolaskruchten
Copy link
Contributor

Oh, I see what you mean, sorry, I misunderstood. Yes, it would be nice if the fixedrange logic took into account the matching axes... For the moment you will have to manually set the y-axis range to get them to match.

@nicolaskruchten
Copy link
Contributor

I filed an issue in the underlying JS library: plotly/plotly.js#5064

@hbaniecki
Copy link
Author

Thanks!

@gvwilson
Copy link
Contributor

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants