Skip to content

Horizontal zooming on faceted scatter plots does not scale y axes correctly #2738

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
mcenno opened this issue Sep 1, 2020 · 0 comments
Open
Labels
bug something broken P3 backlog
Milestone

Comments

@mcenno
Copy link

mcenno commented Sep 1, 2020

The code below produces two plots side by side. Zooming in on the x axis only, using a horizontal motion of the mouse, results in the two y axes being independently rescaled. Zooming using a rectangle or on the y axis works as expected. The error does not appear when using fewer than 501 points.

I'm using Python 3.7.4 and Plotly 4.9.0 on Windows 10.

Example:

import plotly.express as px
import numpy as np
import pandas as pd
size=501
df = pd.DataFrame({'x': np.random.random(size=2*size),
                   'y': np.hstack((np.random.normal(loc=10,  scale=2, size=size), 
                                   np.random.normal(loc=100, scale=2, size=size))),
                   'c': np.hstack((np.zeros(shape=size), np.ones(shape=size)))})

fig = px.scatter(data_frame=df, x='x', y='y', facet_col='c')
fig.show()
@nicolaskruchten nicolaskruchten added this to the v4.x milestone Sep 10, 2020
@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

3 participants