easysnowdata.plotting.categorical#

easysnowdata.plotting.categorical(da: DataArray, ax: Any = None, *, legend: bool = True, legend_kwargs: dict[str, Any] | None = None, title: str | None = None, scalebar: bool | dict[str, Any] = True, graticule: bool | dict[str, Any] = True, basemap: Any = False, figsize: tuple[float, float] | None = None, **imshow_kwargs: Any) → Any[source]#

Plot a categorical DataArray with one colour per class and a legend.

da must carry CF flag_values / flag_meanings (and ideally flag_colors); a time dimension of length one is squeezed. The legend sits outside the axes on the right, listing only the classes present unless legend_kwargs={"all_classes": True}.

Returns the matplotlib Axes.

Examples using easysnowdata.plotting.categorical#

Köppen-Geiger climate classification (Beck et al.)

Köppen-Geiger climate classification (Beck et al.)

NLCD land cover, annual (USGS)

NLCD land cover, annual (USGS)

ESA WorldCover land cover

ESA WorldCover land cover

HLS surface reflectance (Landsat and Sentinel-2)

HLS surface reflectance (Landsat and Sentinel-2)

PlanetScope surface reflectance and UDM2 (Planet)

PlanetScope surface reflectance and UDM2 (Planet)

Sentinel-2 L2A surface reflectance

Sentinel-2 L2A surface reflectance

Sentinel-1 RTC backscatter and local incidence angle

Sentinel-1 RTC backscatter and local incidence angle

MODIS snow cover (MOD10A1, MOD10A1F, MOD10A2)

MODIS snow cover (MOD10A1, MOD10A1F, MOD10A2)

Mountain snow mask (Wrzesien et al.)

Mountain snow mask (Wrzesien et al.)

Seasonal snow classification (Sturm and Liston)

Seasonal snow classification (Sturm and Liston)

VIIRS snow cover (VNP10A1F)

VIIRS snow cover (VNP10A1F)

CHILI heat-load index (CSP ERGo)

CHILI heat-load index (CSP ERGo)

Hillshade: Natural Earth shaded relief as a basemap

Hillshade: Natural Earth shaded relief as a basemap