pyart.graph.GridMapDisplay.plot_cross_section#

GridMapDisplay.plot_cross_section(field, start, end, steps=100, interp_type='linear', x_axis=None, vmin=None, vmax=None, norm=None, cmap=None, title=None, title_flag=True, axislabels_flag=True, colorbar_flag=True, colorbar_label=None, colorbar_orient='vertical', ax=None, fig=None, ticks=None, ticklabs=None, **kwargs)[source]#

Plot a cross section through a set of given points (latitude, longitude).

This uses the MetPy cross section interpolation function.

Additional arguments are passed to Matplotlib’s pcolormesh function.

Parameters:
  • field (str) – Field to be plotted.

  • start (tuple) – A latitude-longitude pair designating the start point of the cross section (units are degrees north and degrees east).

  • end (tuple) – A latitude-longitude pair designating the end point of the cross section (units are degrees north and degrees east).

  • steps (int) – The number of points along the geodesic between the start and the end point (including the end points) to use in the cross section. Defaults to 100.

  • interp_type (str) – The interpolation method, either ‘linear’ or ‘nearest’ (see xarray.DataArray.interp() for details). Defaults to ‘linear’.

  • x_axis (str) – Field to use for plotting along the x-axis (ex. Latitude). Defaults to number of points from the first point.

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

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

  • ticks (array) – Colorbar custom tick label locations.

  • ticklabs (array) – Colorbar custom tick labels.