Skip to content

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

Closed

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

Activity

  1. jklymak commented on Jan 25, 2022

    @jklymak
    Member

    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.

  2. jklymak commented on Jan 25, 2022

    @jklymak
    Member

    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

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