| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
It is a bit hard to say what it actually should do as there is no doc-string, but I am not sure this is the right fix.
(It is a bit strange that orientation is actually what one would think is location.) I think a better solution is to make a dict that picks the "opposite" axis name and then uses that. (If that is now the solution.) |
Sorry, something went wrong.
|
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 toggle_label will work as expected. |
Sorry, something went wrong.
|
Hi @oscargus, I updated the code as you suggested, and It looks like the correct result now : edit: Should the colorbar show ticks when set_labels is set to False. It is visible in this example, But this PR currently removes the ticks as well is set_labels is False. |
Sorry, something went wrong.
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. |
Sorry, something went wrong.
Thanks for confirming @timhoffm, Is there any additional changes needed? |
Sorry, something went wrong.
|
Gentle ping @oscargus - would you mind taking a look again? |
Sorry, something went wrong.
|
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 main. So could you also rebase your branch to pick up that fix? That would allow us to see how your change affects the original example from the issue. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
Superseded by #25884. Thanks for the PR! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
This PR fixes CbarAxes.toggle_label inconsistency as mentioned in issue #23595
closes #23595
PR Checklist
Documentation and Tests
Release Notes