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

Unit agnostic intervals for color-mapped hodographs #3054

Merged
merged 4 commits into from
Jul 1, 2023

Conversation

23ccozad
Copy link
Contributor

Fixes #2404 and allows color-mapped hodographs to be colored with data that does not have units (the data is not in a pint.Quantity object).

New tests were added that specifically test color-mapped hodographs when coloring is based on data with 1) no units, 2) units of height, 3) units of pressure.

Documentation for plot_colormapped() was improved to more clearly describe the special behavior of this function when data is given in units of height.

Checklist

@23ccozad 23ccozad force-pushed the hodo-color-units branch from 0a26e2d to cad27e6 Compare May 26, 2023 17:53
@23ccozad 23ccozad force-pushed the hodo-color-units branch from cad27e6 to ef2cfbb Compare May 26, 2023 18:23
@23ccozad 23ccozad marked this pull request as ready for review May 26, 2023 18:55
@23ccozad 23ccozad requested a review from a team as a code owner May 26, 2023 18:55
@23ccozad 23ccozad requested review from dcamron and removed request for a team May 26, 2023 18:55
@dopplershift dopplershift added this to the July 2023 milestone Jun 30, 2023
Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

I just noticed these as I was about to merge.

src/metpy/plots/skewt.py Outdated Show resolved Hide resolved
src/metpy/plots/skewt.py Outdated Show resolved Hide resolved
@23ccozad
Copy link
Contributor Author

23ccozad commented Jul 1, 2023

Cool! Didn't know we had is_quantity. Does that mean we'll also need to import is_quantity from ..units for skewt.py?

@dopplershift
Copy link
Member

We had some issues we ran into that made things cleaner to have it (even if it's equivalent to what you wrote). Yeah, that should be the right import.

@23ccozad 23ccozad force-pushed the hodo-color-units branch from 89e839a to 581e108 Compare July 1, 2023 00:13
@23ccozad 23ccozad force-pushed the hodo-color-units branch from 581e108 to 4633027 Compare July 1, 2023 00:16
@dopplershift dopplershift merged commit 0b93500 into Unidata:main Jul 1, 2023
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.

Hodograph.plot_colormapped requires units when given colors
2 participants