Skip to content

BUG: handle empty levels array in contour, closes #7486 #8719

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
Jun 14, 2017

Conversation

efiring
Copy link
Member

@efiring efiring commented Jun 4, 2017

This relates to line contours only, not to filled contours.

This handles the case where an empty array is provided as the
"levels" kwarg, or where for any reason there are no levels within
the data range. An example is the case of uniform z. The
levels array is then set to the minimum value of z so that
the plotting can proceed, and a warning is generated.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/whats_new.rst if major new feature
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

This relates to line contours only, not to filled contours.

This handles the case where an empty array is provided as the
"levels" kwarg, or where for any reason there are no levels within
the data range.  An example is the case of uniform z. The
levels array is then set to the minimum value of z so that
the plotting can proceed, and a warning is generated.
@efiring efiring added this to the 2.1 (next point release) milestone Jun 4, 2017
@dstansby dstansby merged commit 6ed951e into matplotlib:master Jun 14, 2017
@efiring efiring deleted the contour_validation branch October 24, 2021 19:52
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.

3 participants