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

QuadMesh.get_clim changed behavior in 3.3.0rc1 #17703

Closed
@MaozGelbart

Description

@MaozGelbart

Bug report

Bug summary

QuadMesh.get_clim() is documented as:

Return the values (min, max) that are mapped to the colormap limits.

Withoutvmin orvmax arguments topcolormesh, this returns the data minimal and maximal values. However in the presence of only one ofvmin orvmax, a change occurred between 3.2.2 and 3.3.0rc1. In 3.3.0rc1 it returns the input vminand vmax, though only one of them was specified. The provided examples also happens (with slight output changes) for settingvmax instead of vmin.

Code for reproduction

importnumpyasnpimportmatplotlib.pyplotaspltdx,dy=0.15,0.05y,x=np.mgrid[slice(-3,3+dy,dy),slice(-3,3+dx,dx)]z= (1-x/2.+x**5+y**3)*np.exp(-x**2-y**2)z=z[:-1, :-1]f,ax=plt.subplots(1,1)ax.pcolormesh(x,y,z,vmin=0)ax.axis([x.min(),x.max(),y.min(),y.max()])formeshinax.collections:print(mesh.get_clim())

Actual outcome

# 3.3.0rc1(0.0, None)

Expected outcome

# 3.2.2(0.0, 1.0510083319982622)

Matplotlib version

  • Operating system: MacOSX
  • Matplotlib version: 3.3.0rc1
  • Matplotlib backend (print(matplotlib.get_backend())): MacOSX
  • Python version: 3.8.3

Installed using pip

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