Skip to content

Default position of colorbar labels overlays its values #19029

Open
@dokato

Description

@dokato

Bug report

Bug summary

The default colourbar label is shifted such that it doesn't overlap with the first item of the colorbar ticks. But when negative numbers are available below it overlaps them as shown below.

Code for reproduction

cbar = plt.colorbar(im, ax = axes[1, 1])
cbar.ax.set_ylabel('RT(1ax) - RT(2ax) [ms]', rotation=270)

Actual outcome

Screenshot 2020-11-27 at 09 23 09

Expected outcome

Such that label of colourbar is shifted more to the right and it doesn't overlap with negative values from the colorbar axis.

Matplotlib version

  • Operating system: MacOS

  • Matplotlib version: 3.2.2

  • Matplotlib backend (print(matplotlib.get_backend())): MacOSX

  • Python version: 3.7.7

  • Other libraries: installed from conda

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions