class act.plotting.Display(ds, subplot_shape=(1,), ds_name=None, subplot_kw=None, **kwargs)[source]

This class is the base class for all of the other Display object types in ACT. This contains the common attributes and routines between the differing Display classes. We recommend that you use the classes inherited from Display for making your plots such as act.plotting.TimeSeriesDisplay() and act.plotting.WindRoseDisplay() instead of trying to do so using the Display object.

However, we do ask that if you add another object to the plotting module of ACT that you make it a subclass of Display. Display provides some basic functionality for the handling of datasets and subplot parameters.

  • fields (dict) – The dictionary containing the fields inside the ARM dataset. Each field has a key that links to an xarray DataArray object.

  • ds (str) – The name of the datastream.

  • file_dates (list) – The dates of each file being displayed.

  • fig (matplotlib figure handle) – The matplotlib figure handle to display the plots on. Initializing the class with this set to None will create a new figure handle. See the matplotlib documentation on what keyword arguments are available.

  • axes (list) – The list of axes handles to each subplot.

  • plot_vars (list) – The list of variables being plotted.

  • cbs (list) – The list of colorbar handles.

  • ds (ACT xarray.Dataset, dict, or tuple) – The ACT xarray dataset to display in the object. If more than one dataset is to be specified, then a tuple can be used if all of the datasets conform to ARM standards. Otherwise, a dict with a key corresponding to the name of each datastream will need to be supplied in order to create the ability to plot multiple datasets.

  • subplot_shape (1 or 2D tuple) – A tuple representing the number of (rows, columns) for the subplots in the display. If this is None, the figure and axes will not be initialized.

  • ds_name (str or None) – The name of the datastream to plot. This is only used if a non-ARM compliant dataset is being loaded and if only one such dataset is loaded.

  • subplot_kw (dict, optional) – The kwargs to pass into fig.subplots()

  • **kwargs (keywords arguments) – Keyword arguments passed to plt.figure().

add_colorbar(mappable[, title, ...])

Adds a colorbar to the plot.

add_subplots([subplot_shape, secondary_y, ...])

Adds subplots to the Display object.

assign_to_figure_axis(fig, ax)

This assigns the Display to a specific figure and axis.


Group the Display by specific units of time.

put_display_in_subplot(display, subplot_index)

This will place a Display object into a specific subplot.