Skip to content

[Bug]: Wrong position of exponent label for extended colorbar #22312

Closed
@zxdawn

Description

@zxdawn

Bug summary

The position of exponent label is wrong for the extended colorbar when the colorbar location is left or right.

Code for reproduction

import matplotlib.pyplot as plt
import numpy as np

N = 18
state = np.random.RandomState(51423)
data = 1e5 * np.cumsum(state.rand(N, N), axis=0)
fig, ax = plt.subplots()
m = ax.pcolor(data)
fig.colorbar(m, ax=ax, extend='max', location='right')
fig.colorbar(m, ax=ax, extend='max', location='left')

Actual outcome

image

Expected outcome

Like V3.4.3

image

Additional information

No response

Operating system

No response

Matplotlib Version

3.5.1

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Installation

conda

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions