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

Skip to content

Remove unnecessary norm typecheck in tripcolor().#25454

Merged
ksunden merged 1 commit intomatplotlib:mainfrom
anntzer:tn
Mar 14, 2023
Merged

Remove unnecessary norm typecheck in tripcolor().#25454
ksunden merged 1 commit intomatplotlib:mainfrom
anntzer:tn

Conversation

@anntzer
Copy link
Copy Markdown
Contributor

@anntzer anntzer commented Mar 14, 2023

The check was overly restrictive (str inputs work just fine per normal ScalarMappable API) and we can just let the TriMesh/PolyCollection ctors handle the validation.

Closes #25453.

PR Summary

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

The check was overly restrictive (str inputs work just fine per normal
ScalarMappable API) and we can just let the TriMesh/PolyCollection ctors
handle the validation.
Copy link
Copy Markdown
Member

@oscargus oscargus left a comment

Choose a reason for hiding this comment

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

Should one add a test with string input to make sure that it keeps supporting that?

@anntzer
Copy link
Copy Markdown
Contributor Author

anntzer commented Mar 14, 2023

We just inherit that from the super-class; I wouldn't bother.

@ksunden ksunden added this to the v3.8.0 milestone Mar 14, 2023
@ksunden ksunden merged commit 3237401 into matplotlib:main Mar 14, 2023
@anntzer anntzer deleted the tn branch March 14, 2023 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH]: Let norm argument accept string values in tripcolour

3 participants