csiro-coasts / emsarray

xarray extension that supports EMS model formats
BSD 3-Clause "New" or "Revised" License
13 stars 2 forks source link

Use PolyCollection over PatchCollection in matplotlib plots #77

Closed mx-moth closed 1 year ago

mx-moth commented 1 year ago

It is significantly faster! Doesn't seem to be any down sides. I had previously dismissed it as I didn't think it supported polygons with different numbers of vertices, but that was because I had read the docs incorrectly.

Convention.make_patch_collection() is now deprecated, and is an alias for Convention.make_poly_collection(). Unless a user is specifically expecting a PatchCollection everything should continue to work - the two classes take most of their functionality from the common underlying Collection class.