geomappy.integration.rioxarray.da_plot_raster

geomappy.integration.rioxarray.da_plot_raster(self, *, ax: Axes | None = None, cartopy: bool = True, **kwargs) tuple[AxesImage, Colorbar | Legend | None]

Plot raster data from a DataArray using Matplotlib or Cartopy.

Parameters:
  • self (xarray.DataArray) – The DataArray 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_raster.

Returns:

  • image (AxesImage) – The image object representing the raster.

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