Skip to content

Conversation

@nmartinez233
Copy link
Contributor

Description Of Changes

Added a RasterPlot() class to act as a generic interface to use Matplotlib's pcolormesh

Checklist

@nmartinez233 nmartinez233 requested review from a team and kgoebber as code owners July 20, 2022 23:03
@nmartinez233 nmartinez233 requested review from dopplershift and removed request for a team July 20, 2022 23:03
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 this looks great! I took the PR for a spin and all seems to work well. Just a few suggestions to quell one warning and simplify the test.

The only thing missing is the baseline image for the test, which is what resulted in the failure of the test. Not too hard to create the baseline image, here is the link to the documentation that explains how to get that created.

https://unidata.github.io/MetPy/latest/devel/CONTRIBUTING.html#image-tests

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.

Looking good, test is now passing. Caught a couple other small things, but I think you are very close now. Might be worth adding an example as well documenting how RasterPlot works.

@needs_cartopy
def test_declarative_raster():
"""Test making a raster plot."""
data = xr.open_dataset(get_test_data('narr_example.nc', as_file_obj=False))

Check warning

Code scanning / CodeQL

File is not always closed

File is opened but is not closed.
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.

Just a few things with the added test to make sure that the behavior is working correctly.

kgoebber
kgoebber previously approved these changes Jul 29, 2022
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.

Looks good from my end!

dopplershift
dopplershift previously approved these changes Sep 9, 2022
@dopplershift dopplershift added Type: Feature New functionality Area: Plots Pertains to producing plots labels Sep 9, 2022
@dopplershift dopplershift added this to the September 2022 milestone Sep 9, 2022
@dopplershift dopplershift merged commit 0b4f897 into Unidata:main Sep 12, 2022
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: Feature New functionality

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

add generic Declarative RasterPlot interface to pcolormesh

3 participants