pyart.graph.RadarMapDisplay.plot_xsection#

RadarMapDisplay.plot_xsection(field, ref_points, step=1000, vert_res=100, alt_max=10000, beamwidth=1.0, dem=None, dem_field='terrain_altitude', mask_tuple=None, vmin=None, vmax=None, norm=None, cmap=None, mask_outside=False, title=None, title_flag=True, axislabels=(None, None), axislabels_flag=True, colorbar_flag=True, colorbar_label=None, colorbar_orient='vertical', gatefilter=None, filter_transitions=True, ax=None, fig=None, ticks=None, ticklabs=None, raster=False, **kwargs)#

Plot a cross-section of radar data interpolated through arbitrary coordinates

Additional arguments are passed to Matplotlib’s pcolormesh function.

Parameters:
  • field (str) – Field to plot.

  • ref_points (ndarray) – N x 2 array containing the lon, lat coordinates of N reference points along the trajectory in WGS84 coordinates, for example [[11, 46], [10, 45], [9, 47]]

Other Parameters:
  • step (int) – Step in meters to use between reference points to calculate the cross-section (i.e horizontal resolution).

  • vert_res (int) – Vertical resolution in meters used to calculate the cross-section

  • alt_max (int) – Maximum altitude of the vertical cross-section

  • beamwidth (float) – 3dB beamwidth in degrees to be used in the calculations

  • dem (Grid) – Grid object that contains data from a digital elevation model the data ist expected to be in meters

  • dem_field (str) – Name of the field within the dem Grid that contains the DEM data

  • mask_tuple ((str, float)) – 2-Tuple containing the field name and value below which to mask field prior to plotting, for example to mask all data where NCP < 0.5 set mask to [‘NCP’, 0.5]. None performs no masking.

  • vmin (float) – Luminance minimum value, None for default value. Parameter is ignored is norm is not None.

  • vmax (float) – Luminance maximum value, None for default value. Parameter is 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.

  • title (str) – Title to label plot with, None to use default title generated from the field and sweep 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.

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

  • ticklabs (array) – Colorbar custom tick labels.

  • colorbar_orient (‘vertical’ or ‘horizontal’) – Colorbar orientation.

  • gatefilter (GateFilter) – GateFilter instance. None will result in no gatefilter mask being applied to data.

  • filter_transitions (bool) – True to remove rays where the antenna was in transition between sweeps from the plot. False will include these rays in the plot. No rays are filtered when the antenna_transition attribute of the underlying radar is not present.

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

  • raster (bool) – False by default. Set to True to render the display as a raster rather than a vector in call to pcolormesh. Saves time in plotting high resolution data over large areas. Be sure to set the dpi of the plot for your application if you save it as a vector format (i.e., pdf, eps, svg).