geomappy.integration.geopandas.gpd_plot_shapes
- geomappy.integration.geopandas.gpd_plot_shapes(self, *, ax: Axes | None = None, cartopy: bool = True, **kwargs) tuple[list[Collection], Colorbar | Legend | None]
Plot geometries from a GeoDataFrame or GeoSeries using Matplotlib or Cartopy.
- Parameters:
self (
geopandas.GeoDataFrameorgeopandas.GeoSeries) – The geospatial data to plot.ax (
Axes, optional) – Axes to plot on. If None, a new figure and axes are created.cartopy (bool, optional) – Whether to use Cartopy. Default is True.
**kwargs – Additional keyword arguments passed to plot_shapes.
- Returns:
collections (list of
Collection) – List of collections for the plotted geometries.legend (
Legend,Colorbar, or None) – Legend or colorbar generated by the plot.