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

Passing clim as keyword argument to pcolormesh does not change limits. #10346

Closed
@heathhenley

Description

@heathhenley

Bug report

Bug summary

Not sure if this is really a bug or just a user issue. I expected that passing aclim tuple topcolormesh with novmin orvmax specified would update the color scale limits. I found that I had to usevmin andvmax instead. Maybe I am misunderstanding andvmin andvmax should always be used. However, it looks like the kwargs are passed into theQuadMesh constructor and thenclim is overwritten withvmin andvmax, even in they are None andclim is given. (https://github.com/heath730/matplotlib/blob/master/lib/matplotlib/axes/_axes.py#L5629).

Code for reproduction

importmatplotlib.pyplotaspltimportnumpyasnpplot_me=np.random.rand(5,5)plt.subplot(211)plt.title("Expected")plt.pcolormesh(plot_me,vmin=0,vmax=0.5)plt.colorbar()plt.subplot(212)plt.title("Result")plt.pcolormesh(plot_me,clim=(0,0.5))plt.colorbar()plt.show()

figure_1

Matplotlib version

  • Operating system: win7
  • Matplotlib version: 2.1.2
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: 3.5.1
  • Jupyter version (if applicable):
  • Other libraries:

Would something like:

  (vmin,vmax)=kwargs.pop('clim', (None,None))

Before the vmin and vmax pops on thisline be a reasonable update?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp