Skip to content

[Bug]: CbarAxesBase.toggle_label doesn't seem to work properly #23595

Closed
@oscargus

Description

@oscargus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!topic: mpl_toolkit

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions