geomappy.integration.geopandas.gpd_plot_classified_shapes

geomappy.integration.geopandas.gpd_plot_classified_shapes(self, *, ax: Axes | None = None, cartopy: bool = True, **kwargs) tuple[list[Collection], Colorbar | Legend | None]

Plot classified geometries from a GeoDataFrame or GeoSeries using Matplotlib or Cartopy.

Parameters:
  • self (geopandas.GeoDataFrame or geopandas.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 for the plot. Default is True.

  • **kwargs – Additional keyword arguments passed to plot_classified_shapes.

Returns:

  • collections (list of Collection) – List of collections representing the plotted geometries.

  • legend (Legend, Colorbar, or None) – Legend or colorbar generated by the plot, if any.