Conversation
|
Looking at https://matplotlib.org/3.3.4/gallery/axes_grid1/demo_axes_grid.html#sphx-glr-gallery-axes-grid1-demo-axes-grid-py (which probably shows the "correct" behaviour), it seems that maybe the solution is to put the ticks and the labels on the top when "orientation" is "top" etc. In this way |
If there are no tick labels, ticks don't have a meaning. So, whether or not to remove them is a purely aesthetic decision. IMHO it's fine to remove them. |
Thanks for confirming @timhoffm, Is there any additional changes needed? |
|
Gentle ping @oscargus - would you mind taking a look again? |
|
Hi @xtanion, thank you for your work on this and sorry it has taken a while to get back to you. It’s great that you have confirmed locally that the method now has the correct behaviour. Could you simplify the code you checked with and make it an image comparison test? Simplify because it just needs enough to prove the desired behaviour is happening with the ticks (so e.g. no need for the annotations). The documentation build check has failed due to a problem that I think has been fixed on |
|
Will that work if the colorbars are on the bottom or the left side? I'm not so sure... Edit: I think this is not the right approach at all, see #25884 instead. |


PR Summary
This PR fixes
CbarAxes.toggle_labelinconsistency as mentioned in issue #23595closes #23595
PR Checklist
Documentation and Tests
pytestpasses)Release Notes
.. versionadded::directive in the docstring and documented indoc/users/next_whats_new/.. versionchanged::directive in the docstring and documented indoc/api/next_api_changes/next_whats_new/README.rstornext_api_changes/README.rst