Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Api pcolorargs deprecation #20268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2021

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented May 20, 2021

PR Summary

Taking pcolormesh(x, y, Z), in 3.3.0 (#16258) we introduced the 'nearest' and 'auto' kwargs for shading in pcolor(mesh) to properly allow for not dropping the last row and column in the case that cell centres are passed for x and y.

In 3.3:

  • Default: 'flat'
  • Cell edges: Z.shape = M, N, len(x) = N+1, len(y) = M+1
    • 'flat': x and y specify cell edges
    • 'nearest'/'gouraud': TypeError
    • 'auto': 'flat'
  • Cell centers: Z.shape = M, N, len(x) = N, len(y) = M
    • 'flat': DeprecationWarning and drop last row and column
    • 'nearest'/'gouraud': x and y specify cell centers
    • 'auto': 'nearest'

In 3.5:

  • Default: 'auto'
  • Cell edges: Z.shape = M, N, len(x) = N+1, len(y) = M+1
    • 'flat': x and y specify cell edges
    • 'nearest'/'gouraud': TypeError
    • 'auto': 'flat'
  • Cell centers: Z.shape = M, N, len(x) = N, len(y) = M
    • 'flat': TypeError
    • 'nearest'/'gouraud': x and y specify cell centers
    • 'auto': 'nearest'

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

TST: udate tests for new pcolormeshdefault

DOC
@jklymak jklymak force-pushed the api-pcolorargs-deprecation branch from 77dfcc8 to c1c02f0 Compare May 20, 2021 05:15
@jklymak jklymak marked this pull request as draft May 20, 2021 05:16
@jklymak jklymak marked this pull request as ready for review May 20, 2021 06:18
Copy link
Contributor

@brunobeltran brunobeltran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brunobeltran brunobeltran merged commit 303873f into matplotlib:master May 20, 2021
@jklymak jklymak deleted the api-pcolorargs-deprecation branch May 20, 2021 19:07
@jklymak
Copy link
Member Author

jklymak commented May 20, 2021

Thanks both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants