pyart.graph.GridMapDisplay#

class pyart.graph.GridMapDisplay(grid, debug=False)[source]#

A class for creating plots from a grid object using xarray with a cartopy projection.

Parameters:
  • grid (Grid) – Grid with data which will be used to create plots.

  • debug (bool) – True to print debugging messages, False to supress them.

Variables:
  • grid (Grid) – Grid object.

  • debug (bool) – True to print debugging messages, False to supress them.

initalize the object.

cartopy_coastlines()

Get coastlines using cartopy.

cartopy_political_boundaries()

Get political boundaries using cartopy.

cartopy_states()

Get state boundaries using cartopy.

generate_filename(field, level[, ext])

Generate a filename for a grid plot.

generate_grid_title(field, level)

Generate a title for a plot.

generate_latitudinal_level_title(field, level)

Generate a title for a plot.

generate_longitudinal_level_title(field, level)

Generate a title for a plot.

plot_colorbar([mappable, orientation, ...])

Plot a colorbar.

plot_cross_section(field[, start, end])

Plot a slice along a given longitude. For documentation of additional arguments see plot_longitudinal_level(). :Parameters: * field (str) -- Field to be plotted. * start, end (tupple of floats) -- tupple of floats containing the latitude and longitude (in degrees) specifying the two points crossed by the slice. If none two extremes of the grid is used.

plot_cross_section_level(field, ind_1, ind_2)

Plot a slice along two points given by its lat, lon Additional arguments are passed to Basemaps's pcolormesh function. :Parameters: * field (str) -- Field to be plotted. * ind_1, ind_2 (float) -- x,y indices of the two points crossed by the slice. * 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 ignored is norm is not None. * 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 the 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 to use default title generated from the field and lat,lon parameters. Parameter is ignored if title_flag is False. * title_flag (bool) -- True to add a title to the 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. * ticks (array) -- Colorbar custom tick label locations. * ticklabs (array) -- Colorbar custom tick labels. * edges (bool) -- True will interpolate and extrapolate the gate edges from the range, azimuth and elevations in the radar, treating these as specifying the center of each gate. False treats these coordinates themselved as the gate edges, resulting in a plot in which the last gate in each ray and the entire last ray are not not plotted. * 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.

plot_crosshairs([lon, lat, linestyle, ...])

Plot crosshairs at a given longitude and latitude.

plot_grid(field[, level, vmin, vmax, norm, ...])

Plot the grid using xarray and cartopy.

plot_grid_contour(field[, level, vmin, ...])

Plot the grid contour using xarray and cartopy.

plot_grid_raw(field[, level, vmin, vmax, ...])

Plot the grid using xarray and cartopy.

plot_latitude_slice(field[, lon, lat])

Plot a slice along a given latitude.

plot_latitudinal_level(field, y_index[, ...])

Plot a slice along a given latitude.

plot_longitude_slice(field[, lon, lat])

Plot a slice along a given longitude.

plot_longitudinal_level(field, x_index[, ...])

Plot a slice along a given longitude.