Skip to content
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

secondary y axis is messing up the y-axis labels #3739

Closed
maddytae opened this issue Jul 25, 2024 · 1 comment
Closed

secondary y axis is messing up the y-axis labels #3739

maddytae opened this issue Jul 25, 2024 · 1 comment

Comments

@maddytae
Copy link

import seaborn.objects as so

df = pd.DataFrame(
{"x": [1, 2, 3, 4, 5], "y1": [5, 2, 1, 6, 2], "y2": [100, 240, 130, 570, 120]}
)
fig, ax1 = plt.subplots(1, 1, figsize=(10, 5))
ax2 = ax1.twinx()
p = so.Plot(df, x="x")
p.add(so.Bar(), y="y1").on(ax1).plot()
p.add(so.Line(), y="y2").on(ax2).plot()

Screenshot 2024-07-25 at 8 39 11 AM
@mwaskom
Copy link
Owner

mwaskom commented Jul 25, 2024

Duplicate of #3614

@mwaskom mwaskom marked this as a duplicate of #3614 Jul 25, 2024
@mwaskom mwaskom closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
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

2 participants