Skip to content

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

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

Closed
zxdawn opened this issue Jan 25, 2022 · 2 comments · Fixed by #22313
Closed

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

zxdawn opened this issue Jan 25, 2022 · 2 comments · Fixed by #22313

Comments

@zxdawn
Copy link

zxdawn commented Jan 25, 2022

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

@jklymak
Copy link
Member

jklymak commented Jan 25, 2022

Sorry this broke. That makes sense, and is a consequence of us changing the colorbar axes bounds to not include the extends in 3.5. I'm not sure off the top of my head what the fix is, but hopefully will be fixed in 3.5.2 or perhaps the next bug fix release.

@jklymak
Copy link
Member

jklymak commented Jan 25, 2022

OK - fix wasn't too bad; confident this will be fixed 3.5.2.

Please do let us know of any other colorbar oddities; 3.5 was a large change....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants