-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Twinning an axis resets tick visibility #15188
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
Comments
I guess the underlying issue is not really what 2.0.2 - The problem is that matplotlib/lib/matplotlib/axes/_base.py Line 4386 in 2cb6bc7
and |
OK, so #10088 just made Do we know why |
Yes.
results in a plot with |
Isn't the problem that Part of the problem is the lack of a distinction in matplotlib between tick lines and, more generally, the demarcation of the axis that can include a line and/or label. When I call |
Thats fair enough - |
Fair enough |
Indeed currently there is no way to distinguish between the case where labels/ticks are off because the user wanted to show them on the right instead or because they generally do not want any labels/ticks to be shown. A solution to this would be to have an additional parameter For now, would something like |
The docstring for
Therefore, I wouldn't expect it to change how the ticks/ticklines appear. I would just expect it to move them. So I don't really understand the problem as you see it. |
FWIW, I added a note about this to the Matplotlib 4.0 roadmap. At some point I think Matplotlib should have a new version that allows some fundamental back compatibility breaks, (whether it's 4.0, or what) and allow us to re-engineer some of these things. Not to preclude a more immediate solution if one can be devised. I think the docstring should really be changed to say |
We could also argue that because backwards compatibility was broken with #9670 for ticklabels already, one can simply do the same for the ticks? |
I don't really understand what the backwards compatibility concern is here. I think it's fine to change the docstring of |
That change to |
I want to point out a case in which the odd behavior of
In this case, both label and color of the y2 axis are disappearing! |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
This appears to still be an issue in matplotlib 3.8.0 |
Bug report
Actual outcome
Expected outcome
Matplotlib version
print(matplotlib.get_backend())
): MacOSXThe text was updated successfully, but these errors were encountered: