Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FIX]: colorbar "boundary" kwarg should be deprecated... #21914

Open
@jklymak

Description

@jklymak

Problem

We broke this in 3.5.0, but in 3.4.3

import matplotlib.pyplot as pltimport numpy as npimport matplotlib as mplfig, ax = plt.subplots()pc = ax.imshow(np.random.randn(10, 10), cmap='RdBu_r')cb = fig.colorbar(pc, ax=ax, boundaries=np.linspace(-4, 4, 5))plt.show()

would do:

cbarissue

I'm not a fan of us enabling digitizing the colorbardifferently than the data. If someone wants boundaries, they should be doing them with a BoundaryNorm:

fig,ax=plt.subplots()norm=mpl.colors.BoundaryNorm(np.linspace(-4,4,5),256)pc=ax.imshow(X,cmap='RdBu_r',norm=norm)cb=fig.colorbar(pc,ax=ax)

cbarissue2

Proposed solution

deprecate the boundaries kwarg....

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp