Get a Matplotlib patch from a (Multi)Polygon. Note: this function is experimental, and mainly targeting (interactive) exploration, debugging and illustration purposes. Parameters ---------- polygon : shapely.Polygon or shapely.MultiPolygon The polygon to convert to a Ma
(polygon, **kwargs)
| 37 | |
| 38 | |
| 39 | def patch_from_polygon(polygon, **kwargs): |
| 40 | """Get a Matplotlib patch from a (Multi)Polygon. |
| 41 | |
| 42 | Note: this function is experimental, and mainly targeting (interactive) |
| 43 | exploration, debugging and illustration purposes. |
| 44 | |
| 45 | Parameters |
| 46 | ---------- |
| 47 | polygon : shapely.Polygon or shapely.MultiPolygon |
| 48 | The polygon to convert to a Matplotlib Patch. |
| 49 | **kwargs |
| 50 | Additional keyword arguments passed to the matplotlib Patch. |
| 51 | |
| 52 | Returns |
| 53 | ------- |
| 54 | Matplotlib artist (PathPatch) |
| 55 | |
| 56 | """ |
| 57 | from matplotlib.patches import PathPatch |
| 58 | |
| 59 | return PathPatch(_path_from_polygon(polygon), **kwargs) |
| 60 | |
| 61 | |
| 62 | def plot_polygon( |
searching dependent graphs…