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

seaborn.objects.Plot.theme unexpected yaxis behavior in 0.13 #3659

Open
cwberardi opened this issue Mar 21, 2024 · 3 comments
Open

seaborn.objects.Plot.theme unexpected yaxis behavior in 0.13 #3659

cwberardi opened this issue Mar 21, 2024 · 3 comments

Comments

@cwberardi
Copy link

I'm having an issue in 0.13.2 with y-axis formatting. The issue was not present in 0.12. Setting ytick.labelleft : False with ytick.labelright : True using seaborn.objects.Plot.theme in 0.12 would move the ylabels from left to right, but in 0.13 it creates a right label without removing the left.

from matplotlib import pyplot as plt
import seaborn as sns
import seaborn.objects as so
import pandas as pd

# create simple dataframe

df = pd.DataFrame(
    {
        "X": [1, 2, 3, 4],
        "Y1": [1, 2, 3, 4],
        "Y2": [0, 3, 9, 81],
    }
)

(
    so.Plot(df, x="X", y="Y1")
    .add(so.Line(color="C0"))
    .theme(    {"ytick.labelleft": False,
                        "ytick.labelright": True}

                )
)

output

I have not been able to find a workaround.

@cwberardi cwberardi changed the title seaborn object theme unexpected behavior in 0.13 seaborn.objects.Plot.theme unexpected yaxis behavior in 0.13 Mar 21, 2024
@mwaskom
Copy link
Owner

mwaskom commented Mar 21, 2024

This sounds like a duplicate or maybe just a related issue as #3614

@cwberardi
Copy link
Author

This sounds like a duplicate or maybe just a related issue as #3614

I had the same thought, but because I didn't have a good hypothesis "why" I opened a new issue.

@mwaskom
Copy link
Owner

mwaskom commented Mar 21, 2024

Yeah no worries, just linking them as it seems similar (though not identical)

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