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

pcolor deprecation warning with default settings #18546

Closed
@johnomotani

Description

@johnomotani

Bug report

Bug summary

pcolor() produces a deprecation warning with default settings.

The default ofrcParams['pcolor.shading'] seems to be'flat', which is deprecated (at least sometimes). Maybe the default should be changed to'auto' or'nearest'?

Code for reproduction

frommatplotlibimportpyplotaspltimportnumpyasnpx=np.arange(2.)y=np.arange(2.)z=np.ones([2,2])plt.pcolor(x,y,z)

Actual outcome

MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3.  Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading'].  This will become an error two minor releases later.  plt.pcolor(x,y,z)

Expected outcome

No warning

Matplotlib version

  • Operating system: Linux Mint 19
  • Matplotlib version: 3.3.2
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
  • Python version: 3.7.6
  • Jupyter version (if applicable): N/A
  • Other libraries: None

Installed with conda from conda-forge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp