Skip to content

Conversation

@nawendt
Copy link
Contributor

@nawendt nawendt commented Sep 8, 2021

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.

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

Closes Unidata#2063
@nawendt nawendt requested review from a team and kgoebber as code owners September 8, 2021 03:43
Eliminate geopandas import issues by just creating a shapely.Polygon


@exporter.export
class SPCHatch(matplotlib.hatch.Shapes):
Copy link
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. 😉

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

2 participants