autogalaxy.plot.Colorbar#

class Colorbar[source]#

Bases: AbstractMatWrap

Customizes the colorbar of the plotted figure.

This object wraps the following Matplotlib method:

The colorbar object cb that is created is also customized using the following methods:

Parameters
  • manual_tick_labels (Optional[List[float]]) – Manually override the colorbar tick labels to an input list of float.

  • manual_tick_values (Optional[List[float]]) – If the colorbar tick labels are manually specified the locations on the colorbar they appear running 0 -> 1.

Methods

set

Set the figure's colorbar, optionally overriding the tick labels and values with manual inputs.

set_with_color_values

Set the figure's colorbar using an array of already known color values.

Attributes

config_dict

config_folder

set(ax=None)[source]#

Set the figure’s colorbar, optionally overriding the tick labels and values with manual inputs.

set_with_color_values(cmap, color_values, ax=None)[source]#

Set the figure’s colorbar using an array of already known color values.

This method is used for producing the color bar on a Voronoi mesh plot, which is unable to use the in-built Matplotlib colorbar method.

Parameters
  • cmap (str) – The colormap used to map normalized data values to RGBA colors (see https://matplotlib.org/3.3.2/api/cm_api.html).

  • color_values (ndarray) – The values of the pixels on the Voronoi mesh which are used to create the colorbar.