Skip to content

Conversation

@kgoebber
Copy link
Collaborator

@kgoebber kgoebber commented Sep 7, 2023

Description Of Changes

This PR implements a number of improvements to the declarative interface to allow for additional kwargs to alter how a data element is plotted. Primarily this adds a new trait called mpl_args for all declarative plot classes and is designed to be a dictionary of values. Additionally, this PR adds the stroke_width trait for PlotGeometry since it would be a heavily used element that we wish to expose according to issue #2719. This would also allow for more nuanced use of alpha and zorder as discussed in #2746.

Checklist

@kgoebber kgoebber requested a review from a team as a code owner September 7, 2023 23:01
@kgoebber kgoebber requested review from dcamron and removed request for a team September 7, 2023 23:01
@needs_cartopy
def test_declarative_raster_options():
"""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.
@dopplershift dopplershift added Type: Enhancement Enhancement to existing functionality Area: Plots Pertains to producing plots labels Oct 18, 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.

Minor typo, but otherwise this looks ready.

@dopplershift dopplershift merged commit bd15585 into Unidata:main Oct 18, 2023
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: Enhancement Enhancement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PlotGeometry missing trait for stroke width

2 participants