Skip to content

secondary_y not always working #9620

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
jrkerns opened this issue Mar 9, 2015 · 3 comments
Closed

secondary_y not always working #9620

jrkerns opened this issue Mar 9, 2015 · 3 comments

Comments

@jrkerns
Copy link

jrkerns commented Mar 9, 2015

See a SO question I asked that has the relevant information: http://stackoverflow.com/questions/28840036/pandas-secondary-y-axis-for-boxplots

Essentially, the secondary_y argument of plot() doesn't do anything for boxplots and several other plot types. It will work for line plots however.

@TomAugspurger
Copy link
Contributor

Should be helped by #9321 which will clarify what is / isn't supported.

I'm not sure that secondary_y makes sense for a boxplot though, which typically doesn't have a legend to indicate which elements are on the second axis. What do you think?

I'd recommend transforming your data before plotting.

@jrkerns
Copy link
Author

jrkerns commented Mar 9, 2015

I suppose if the secondary axis is tied to having a legend then the current implementation makes sense, and more documentation/warning may help. I agree if there is no legend then there is no explicit way the person viewing the plot knows what is plotted against what, but I guess I wish it was hackable so I could do it anyway and then explain it in the figure description.

Unfortunately for me, I can't transform the data as it's one of many plots I'll have for a publication and they all need to be the same style.

Thanks for the help.

@TomAugspurger
Copy link
Contributor

Yeah, sorry to not be of more help. The only other thing I can think of is to append a (right axis) to the x-axis label, but this doesn't feel great.

There are certainly ways around this if you drop down to matplotlib though. I may have a chance later to take a crack at your SO questoin.

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