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

Remove contour warning for "no-valid-levels".#24912

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
oscargus merged 1 commit intomatplotlib:mainfromanntzer:cw
Jan 12, 2023

Conversation

anntzer
Copy link
Contributor

If the user explicitly passes a levels array (the default is auto-determined), let's assume that they know what they are doing.Closes#23778.

(Icould consider keeping the warning for now in the case where the user didn't passlevels butz is uniform throughout, as that's more likely to be a "data-exploration" case.)

PR Summary

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (andpytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild 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 indoc/users/next_whats_new/
  • API changes are marked with a.. versionchanged:: directive in the docstring and documented indoc/api/next_api_changes/
  • Release notes conform with instructions innext_whats_new/README.rst ornext_api_changes/README.rst

If the user explicitly passes a levels array (the default isauto-determined), let's assume that they know what they are doing.
@rcomer
Copy link
Member

This also closes#20203.

@oscargus
Copy link
Member

Is this comment from@ianthomas23 dealt with?

"We should probably add a check for no levels specified by the user for a contour call, as already happens for contourf."

@anntzer
Copy link
ContributorAuthor

I'm not sure what this really means, but if it's adding a check forlevels=[], I'd say that's again something explicitly asked by the user and we should not warn (just like we don't warn forplot([], [])).

@ianthomas23
Copy link
Member

My comment meant that if there is an explicit check for user-specifiedlevels for acontourf call, there should be a similar check for acontour call so that the checks are consistent. But as you are removing thecontourf check then that makes them consistent too, as neither checks.

oscargus reacted with thumbs up emoji

@tacaswelltacaswell modified the milestones:v3.9.0,v3.8.0Jan 9, 2023
Copy link
Member

@oscargusoscargus left a comment

Choose a reason for hiding this comment

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

I see the point of:

(I could consider keeping the warning for now in the case where the user didn't pass levels but z is uniform throughout, as that's more likely to be a "data-exploration" case.)

but do not have strong opinions enough to claim that it should be there. Seems like a quite safe option though.

@anntzer
Copy link
ContributorAuthor

Let's see what others think here.

Copy link
Member

@tacaswelltacaswell left a comment

Choose a reason for hiding this comment

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

I'm in favor of removing this warning and if we get reports of "all constant and no lines" we can consider putting the warning back in the fully automatic case (and it would make sense to check on the "all constant" case explicitly).

@anntzer
Copy link
ContributorAuthor

Sounds good; this is good to go, then?

@oscargusoscargus modified the milestones:v3.8.0,v3.7.0Jan 12, 2023
@oscargus
Copy link
Member

Let's get this in for 3.7.

@oscargusoscargus merged commit018c5ef intomatplotlib:mainJan 12, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestJan 12, 2023
@anntzeranntzer deleted the cw branchJanuary 12, 2023 23:07
oscargus added a commit that referenced this pull requestJan 12, 2023
…912-on-v3.7.xBackport PR#24912 on branch v3.7.x (Remove contour warning for "no-valid-levels".)
@ksundenksunden mentioned this pull requestFeb 20, 2023
6 tasks
@rcomerrcomer mentioned this pull requestMar 8, 2024
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@oscargusoscargusoscargus approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.7.0
Development

Successfully merging this pull request may close these issues.

[ENH]: Allow override of contour level autoscaling contour edge case with all data below levels and a surrounding field of zeros
5 participants
@anntzer@rcomer@oscargus@ianthomas23@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp