act.plotting.HistogramDisplay

class act.plotting.HistogramDisplay(obj, subplot_shape=(1,), ds_name=None, **kwargs)[source]

This class is used to make histogram plots. It is inherited from Display and therefore contains all of Display’s attributes and methods.

Examples

To create a TimeSeriesDisplay with 3 rows, simply do:

ds = act.read_netcdf(the_file)
disp = act.plotting.HistogramDisplay(ds, subplot_shape=(3,), figsize=(15, 5))

The HistogramDisplay constructor takes in the same keyword arguments as plt.subplots. For more information on the plt.subplots keyword arguments, see the matplotlib documentation. If no subplot_shape is provided, then no figure or axis will be created until add_subplots or plots is called.

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

Adds a colorbar to the plot.

add_subplots([subplot_shape, subplot_kw])

Adds subplots to the Display object.

assign_to_figure_axis(fig, ax)

This assigns the Display to a specific figure and axis.

plot_heatmap(x_field, y_field[, dsname, ...])

This procedure will plot a heatmap of a histogram from 2 variables.

plot_size_distribution(field, bins[, time, ...])

This procedure plots a stairstep plot of a size distribution.

plot_stacked_bar_graph(field[, dsname, ...])

This procedure will plot a stacked bar graph of a histogram.

plot_stairstep_graph(field[, dsname, bins, ...])

This procedure will plot a stairstep plot of a histogram.

put_display_in_subplot(display, subplot_index)

This will place a Display object into a specific subplot.

set_xrng(xrng[, subplot_index])

Sets the x range of the plot.

set_yrng(yrng[, subplot_index])

Sets the y range of the plot.