Skip to content

Add SPC hatch effect for PlotGeometry - #2086

Open
nawendt wants to merge 2 commits into
Unidata:mainfrom
nawendt:spc-hatch
Open

nawendt wants to merge 2 commits into
Unidata:mainfrom
nawendt:spc-hatch

Conversation

@nawendt

@nawendt nawendt commented Sep 8, 2021

Copy link
Copy Markdown
Contributor

Add hatching effect to mimic hatching used for SPC probabilistic severe weather outlooks. Testing and an example were also added.

Matplotlib complains about the fact this is a custom hatch that uses a custom string to invoke its use. It will have to be dealt with somehow as that will eventually cause and error in future versions of matplotlib.

@nawendt
nawendt requested review from a team and kgoebber as code owners September 8, 2021 03:43


@exporter.export
class SPCHatch(matplotlib.hatch.Shapes):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we wait on the custom hatch? Matplotlib has deprecated passing in hatch values it doesn't understand in 3.4, with plans to remove it in 3.6. Thus using this would result in an error trying to use this when matplotlib 3.6 comes out. matplotlib/matplotlib#20690 is discussing having a proper API for adding custom hatches, so it would be good for you to weigh in there (maybe with the example of what yours looks like). You could also push that forward with a draft API if you're feeling particularly driven. 😉

Add hatching effect to mimic hatching used for SPC probabilistic severe
weather outlooks. Testing and an example were also added.

Closes Unidata#2063
Eliminate geopandas import issues by just creating a shapely.Polygon
return feat.with_scale(scaler)


<<<<<<< HEAD

This branch has not been deployed

No deployments
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.

Add hatching to PlotGeometry

3 participants