act.plotting.DistributionDisplay.plot_heatmap#

DistributionDisplay.plot_heatmap(x_field, y_field, dsname=None, x_bins=None, y_bins=None, subplot_index=(0,), set_title=None, density=False, set_shading='auto', hist_kwargs={}, threshold=None, **kwargs)[source]#

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

Parameters:
  • x_field (str) – The name of the field to take the histogram of on the X axis.

  • y_field (str) – The name of the field to take the histogram of on the Y axis.

  • dsname (str or None) – The name of the datastream the field is contained in. Set to None to let ACT automatically determine this.

  • x_bins (array-like, int, or None) – The histogram bin boundaries to use for the variable on the X axis. Set to None to use numpy’s default boundaries. If an int, will indicate the number of bins to use

  • y_bins (array-like, int, or None) – The histogram bin boundaries to use for the variable on the Y axis. Set to None to use numpy’s default boundaries. If an int, will indicate the number of bins to use

  • subplot_index (tuple) – The subplot index to place the plot in

  • set_title (str) – The title of the plot.

  • density (bool) – Set to True to plot a p.d.f. instead of a frequency histogram.

  • set_shading (string) – Option to to set the matplotlib.pcolormesh shading parameter. Default to ‘auto’

  • threshold (float) – Value on which to threshold the histogram results for plotting. Setting to 0 will ensure that all 0 values are removed from the plot making it easier to distringuish between 0 and low values

  • hist_kwargs (Additional keyword arguments to pass to numpy histogram.)

  • Other keyword arguments will be passed into :func:`matplotlib.pyplot.pcolormesh`.

Returns:

return_dict (dict) – A dictionary containing the plot axis handle, bin boundaries, and generated histogram.