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
[Bug]: CbarAxesBase.toggle_label
doesn't seem to work properly
#23595
Comments
Marking as good first issue, but medium as it requires digging in how to modify the calls here (and possibly deprecating/replacing any other methods that may be affected). These are the lines that are not working properly: matplotlib/lib/mpl_toolkits/axes_grid1/axes_grid.py Lines 34 to 36 in efaedd8
|
I would like to be assigned to this issue. |
@vorbrodt Thanks for your interest! We do typically not assign persons to issues, but feel free to work on it anyway. Your note will most likely lead to people focusing on other issues instead, |
Just noting that there are some other demos that also use https://matplotlib.org/stable/gallery/axes_grid1/demo_axes_grid2.html Going back to 3.4.3, they probably are as expected: (Although demo_edge_colorbar.html seems to be missing a label on the left figure in all available versions of the documentation...) |
Okay, I see. I'll be working on this issue. |
The problem seems related to matplotlib/lib/mpl_toolkits/axes_grid1/mpl_axes.py Lines 118 to 120 in b298423
is not correct. |
Hi @oscargus, I was trying to fix this issue...maybe |
Bisects to #20054. |
I don't quite understand how this can bisect to #20054? That PR is for the normal colorbar axes, not the CbarAxes? |
cbaraxes ultimately uses normal colorbars (it's just an axes subclass that adds a colorbar() method on the axes to draw colorbars on that axes). |
Bug summary
It appears as if
CbarAxesBase.toggle_label
and therefore, maybe,SimpleAxisArtist.toggle
and possibly something else does not work as expected.Probably related to the colorbar rewrite?
Code for reproduction
https://matplotlib.org/stable/gallery/axes_grid1/demo_axes_grid.html
Actual outcome
The two middle figures have visible tick labels for the color bar.
Expected outcome
No visible tick labels.
Additional information
There seems to be some sort of mismatch between the
_axisnum
property and the location of the labels. It seems to work if the labels are located at the same side as the colorbar, i.e., right and bottom.Operating system
Arch
Matplotlib Version
3.5.2 and
main
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
git checkout
The text was updated successfully, but these errors were encountered: