Skip to content
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

Support floats in image_range #3028

Merged
merged 3 commits into from
May 3, 2023

Conversation

wxmann
Copy link
Contributor

@wxmann wxmann commented May 1, 2023

Description Of Changes

Permits floats to be used in image_range declarative plot property. Previously, only integer values were allowed.

If image_range is a plt.Normalize instance, just returns that object. Previously, image_range permitted plt.Normalize instances to be set, but threw an exception in the plotting execution.

Checklist

@wxmann wxmann requested review from a team and kgoebber as code owners May 1, 2023 08:53
@wxmann wxmann requested review from dopplershift and removed request for a team May 1, 2023 08:53
@CLAassistant
Copy link

CLAassistant commented May 1, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@kgoebber kgoebber left a comment

Choose a reason for hiding this comment

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

Overall the PR is in good shape, just the one small linting issue and if we can get a second test to cover the use of plt.Normalize directly, that would be great. Appreciate the submission @wxmann.

src/metpy/plots/declarative.py Outdated Show resolved Hide resolved
src/metpy/plots/declarative.py Show resolved Hide resolved
@wxmann
Copy link
Contributor Author

wxmann commented May 3, 2023

Overall the PR is in good shape, just the one small linting issue and if we can get a second test to cover the use of plt.Normalize directly, that would be great. Appreciate the submission @wxmann.

Addressed both in the latest commit. Thank you!

@dopplershift
Copy link
Member

Thanks for sending in the fix!

@dopplershift dopplershift added Area: Plots Pertains to producing plots Type: Bug Something is not working like it should labels May 3, 2023
@dopplershift dopplershift added this to the 1.5.0 milestone May 3, 2023
@dopplershift dopplershift merged commit 0c7ce09 into Unidata:main May 3, 2023
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Plots Pertains to producing plots Type: Bug Something is not working like it should
Projects
None yet
Development

Successfully merging this pull request may close these issues.

image_range trait in declarative plotting interface doesn't accept arbitrary floating point values
4 participants