pyart.graph.GridMapDisplay.plot_grid#
- GridMapDisplay.plot_grid(field, level=0, vmin=None, vmax=None, norm=None, cmap=None, mask_outside=False, title=None, title_flag=True, axislabels=(None, None), axislabels_flag=False, colorbar_flag=True, colorbar_label=None, colorbar_orient='vertical', ax=None, fig=None, lat_lines=None, lon_lines=None, projection=None, embellish=True, add_grid_lines=True, ticks=None, ticklabs=None, imshow=False, **kwargs)[source]#
Plot the grid using xarray and cartopy.
Additional arguments are passed to Xarray’s pcolormesh function.
- Parameters:
field (str) – Field to be plotted.
level (int) – Index corresponding to the height level to be plotted.
- Other Parameters:
vmin, vmax (float) – Lower and upper range for the colormesh. If either parameter is None, a value will be determined from the field attributes (if available) or the default values of -8, 64 will be used. Parameters are used for luminance scaling.
norm (Normalize or None, optional) – matplotlib Normalize instance used to scale luminance data. If not None the vmax and vmin parameters are ignored. If None, vmin and vmax are used for luminance scaling.
cmap (str or None) – Matplotlib colormap name. None will use default colormap for the field being plotted as specified by the Py-ART configuration.
mask_outside (bool) – True to mask data outside of vmin, vmax. False performs no masking.
title (str) – Title to label plot with, None will use the default generated from the field and level parameters. Parameter is ignored if the title_flag is False.
title_flag (bool) – True to add title to plot, False does not add a title.
axislabels ((str, str)) – 2-tuple of x-axis, y-axis labels. None for either label will use the default axis label. Parameter is ignored if axislabels_flag is False.
axislabels_flag (bool) – True to add label the axes, False does not label the axes.
colorbar_flag (bool) – True to add a colorbar with label to the axis. False leaves off the colorbar.
colorbar_label (str) – Colorbar label, None will use a default label generated from the field information.
colorbar_orient (‘vertical’ or ‘horizontal’) – Colorbar orientation.
ax (Axis) – Axis to plot on. None will use the current axis.
fig (Figure) – Figure to add the colorbar to. None will use the current figure.
lat_lines, lon_lines (array or None) – Location at which to draw latitude and longitude lines. None will use default values which are reasonable for maps of North America.
projection (cartopy.crs class) – Map projection supported by cartopy. Used for all subsequent calls to the GeoAxes object generated. Defaults to PlateCarree.
embellish (bool) – True by default. Set to False to supress drawinf of coastlines etc… Use for speedup when specifying shapefiles. Note that lat lon labels only work with certain projections.
add_grid_lines (bool) – If True add lat/lon lines Note that lat lon labels only work with certain projections.
ticks (array) – Colorbar custom tick label locations.
ticklabs (array) – Colorbar custom tick labels.
imshow (bool) – If used, plot uses ax.imshow instead of ax.pcolormesh. Default is False.