Plotting#

plotting#

Warning

Experimental. Used by some scripts

class field_plot_kwargs(label, tcoord, zcoord, hcoords, vrange, cmap)[source]#

a collection of field-specific plotting decorations

plot_vertical_prof_time_slice_compare_sims_slice(da_collection, plot_kwargs, x_lbl, tcoord, zcoord, with_markers=False)[source]#

Plot a row of plots with a different time in each panel. Compare simulations from da_collection in each panel.

Parameters:
  • da_collection (Mapping[str, DataArray]) – a dictionary of 2d xr.DataArrays to be plotted. will use the keys to pick plotting style from plot_kwargs.

  • plot_kwargs (Mapping[str, Any]) – a dictionary of plotting style parameters for each simulation.

  • x_lbl (str) – a display label for the plotted field, on the x-axis

  • tcoord (str) – name of time coordinate – will generate one panel per time index

  • zcoord (str) – name of y-coordinate, leave as None for default

  • with_markers – general flag to add markers to the plotted lines.

plot_horizontal_slice_tseries(da_collection, tcoord, cmap, field_lbl, zcoord)[source]#

Plot a grid of horizontal slices in each panel each row corresponds to a different simulation each column corresponds to a different time.

Parameters:
  • da_collection (Mapping[str, DataArray]) – a dictionary of 3d xr.DataArrays to be plotted. One of the dimensions must be tcoord

  • tcoord (str) – name of time coordinate – will generate one column per time index

  • cmap (str) – colormap to use for plotting

  • field_lbl (str) – a display label for the plotted field

plot_vertical_prof_time_slice_compare_fields(ds, fields, reduction, zcoord, tslice={'t': array([60, 120, 180, 240, 300, 360, 420, 480, 540, 600, 660, 720, 780, 840, 900])}, field_lbls=['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], les_reference=None, zmax=1000000.0, ds_label='')[source]#

Plot a row of plots with a time slice in each panel. Compare fields in each panel.

tslice : selection of times in minutes. reduction: ‘mean’ or ‘median’

Plot style template file#
[{
  "label": "string",
  "linestyle": "string",
  "color": "string",
  "linewdith": "float",
  "marker": "string"
  }
]