diagnostic.visualizations.plot_map#

plot_map(da: DataArray, **kwargs)[source]#

Plots a simple map of a 2D xarray DataArray.

Default plot settings:

  • subplot_kws: {‘projection’: ccrs.PlateCarree()}

  • cbar_kwargs: {‘label’: “{{da.attrs.get(‘long_name’, ‘Data’)}} ({{da.name}})”}

Parameters:#

daxr.DataArray

The 2D xarray DataArray to plot. It should have latitude and longitude dimensions.

titlestr, optional

The title for the plot. If not provided, a default title based on the DataArray’s long_name attribute will be set.

**kwargs :

Additional keyword arguments to pass to the xarray DataArray plot method.

Returns:#

axmatplotlib.axes.Axes

The matplotlib Axes with the plot.