def plot(self, ax: GeoAxesSubplot, **kwargs) -> None: # coverage: ignore flat = self.flatten() if isinstance(flat, base.BaseMultipartGeometry): for poly in flat: # quick and dirty sub = Airspace("", [ExtrudedPolygon(poly, 0, 0)]) sub.plot(ax, **kwargs) return if "facecolor" not in kwargs: kwargs["facecolor"] = "None" if "edgecolor" not in kwargs: kwargs["edgecolor"] = ax._get_lines.get_next_color() if "projection" in ax.__dict__: ax.add_geometries([flat], crs=PlateCarree(), **kwargs) else: ax.add_patch(MplPolygon(list(flat.exterior.coords), **kwargs))
def plot(self, ax: GeoAxesSubplot, **kwargs) -> Artist: """Plotting function. All arguments are passed to the geometry""" if "facecolor" not in kwargs: kwargs["facecolor"] = "None" if "edgecolor" not in kwargs: kwargs["edgecolor"] = ax._get_lines.get_next_color() if "projection" in ax.__dict__: return ax.add_geometries([self.shape], crs=PlateCarree(), **kwargs) else: return ax.add_patch( MplPolygon(list(self.shape.exterior.coords), **kwargs))