act.plotting.HistogramDisplay.add_colorbar

HistogramDisplay.add_colorbar(mappable, title=None, subplot_index=(0,), pad=None, width=None, **kwargs)

Adds a colorbar to the plot.

Parameters:
  • mappable (matplotlib mappable) – The mappable to base the colorbar on.

  • title (str) – The title of the colorbar. Set to None to have no title.

  • subplot_index (1 or 2D tuple, list, or array) – The index of the subplot to set the x range

  • pad (float) – Padding to right of plot for placement of the colorbar

  • width (float) – Width of the colorbar

  • **kwargs (keyword arguments) – The keyword arguments for plt.colorbar()

Returns:

cbar (matplotlib colorbar handle) – The handle to the matplotlib colorbar.