csep.utils.plots.plot_spatial_dataset
- csep.utils.plots.plot_spatial_dataset(gridded, region, ax=None, show=False, extent=None, set_global=False, plot_args=None)[source]
Plot spatial dataset such as data from a gridded forecast
- Parameters:
gridded (2D
numpy.array
) – Values according to region,region (
CartesianGrid2D
) – Region in which gridded values are containedshow (bool) – Flag if the figure is displayed
extent (list) – default
forecast.region.get_bbox()
set_global (bool) – Display the complete globe as basemap
plot_args (dict) –
matplotlib and cartopy plot arguments. Dict keys are str, whose values can be:
- title:
str
- default None
- title_size:
int
- default 10
- filename:
str
- default None
- projection:
cartopy.crs.Projection
- defaultcartopy.crs.PlateCarree
- grid:
bool
- default True
- grid_labels:
bool
- default True
- grid_fontsize:
float
- default 10.0
- basemap:
str
. Possible values are: stock_img, stamen_terrain, stamen_terrain-background, google-satellite, ESRI_terrain, ESRI_imagery, ESRI_relief, ESRI_topo, ESRI_terrain, or webservice link. Default is None
- coastline:
bool
- Flag to plot coastline. default True,
- borders:
bool
- Flag to plot country borders. default False,
- region_border:
bool
- Flag to plot the dataset region border. default True,
- linewidth:
float
- Line width of borders and coast lines. default 1.5,
- linecolor:
str
- Color of borders and coast lines. default ‘black’,
- cmap:
str
/pyplot.colors.Colormap
- default ‘viridis’
- clim:
list
- Range of the colorbar. default None
- clabel:
str
- Label of the colorbar. default None
- clabel_fontsize:
float
- default None
- cticks_fontsize:
float
- default None
- alpha:
float
- default 1
- alpha_exp:
float
- Exponent for the alpha func (recommended between 0.4 and 1). default 0
- Returns:
matplotlib.pyplot.ax
object