easysnowdata.plotting.map#

easysnowdata.plotting.map(da: DataArray, ax: Any = None, *, title: str | None = None, cbar_label: str | None = None, colorbar: bool = True, 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]#

Draw one raster as a map with the package’s conventions.

Parameters:
  • da – A 2-D DataArray (a length-one time is squeezed) with a CRS on .rio / .odc.

  • ax – Axes to draw on; a new figure sized to the data’s aspect otherwise.

  • title – Defaults to the array’s long_name plus its date when it has one.

  • cbar_label – Defaults to label(), i.e. long name [units].

  • colorbar – Draw a colorbar matched to the map’s height.

  • scalebar – See finish_map().

  • graticule – See finish_map().

  • basemap – See finish_map().

  • figsize – Figure size when ax is None; derived from the extent otherwise.

  • **imshow_kwargs – Passed to xarray.DataArray.plot.imshow() (cmap, vmin, vmax, norm …).

Returns:

matplotlib.axes.Axes

Examples using easysnowdata.plotting.map#

Countries, states, counties and admin units

Countries, states, counties and admin units

Glacier outlines: Randolph Glacier Inventory 7.0 and 6.0

Glacier outlines: Randolph Glacier Inventory 7.0 and 6.0

Mountain ranges: GMBA Mountain Inventory v2

Mountain ranges: GMBA Mountain Inventory v2

Natural Earth map layers: lakes, rivers, glaciers, places

Natural Earth map layers: lakes, rivers, glaciers, places

ERA5 reanalysis (ARCO-ERA5 and Earth Engine)

ERA5 reanalysis (ARCO-ERA5 and Earth Engine)

Forest cover fraction (CGLS-LC100)

Forest cover fraction (CGLS-LC100)

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.)

SNODAS snow water equivalent and depth (NOHRSC)

SNODAS snow water equivalent and depth (NOHRSC)

UCLA snow reanalysis (Margulis et al.)

UCLA snow reanalysis (Margulis et al.)

VIIRS snow cover (VNP10A1F)

VIIRS snow cover (VNP10A1F)

CHILI heat-load index (CSP ERGo)

CHILI heat-load index (CSP ERGo)

Digital elevation models: Copernicus, NASADEM, SRTM, 3DEP, ALOS, GEDTM30

Digital elevation models: Copernicus, NASADEM, SRTM, 3DEP, ALOS, GEDTM30

Hillshade: Natural Earth shaded relief as a basemap

Hillshade: Natural Earth shaded relief as a basemap