add_colorbar#

madcubapy.visualization.add_colorbar(ax=None, location='right', size=0.05, pad=0.03, **kwargs)[source]#

Add a colorbar to one side of a Axes or WCSAxes object.

Parameters:
axAxes or WCSAxes

Axes to which the colorbar is added.

location{“left”, “right”, “bottom”, “top”}

Where the colorbar is positioned relative to the main WCSAxes.

sizefloat

Fraction of ‘ax’ to use as size for the colorbar.

padfloat

Separation between the colorbar bar and ‘ax’.

Returns:
cbarColorbar

Colorbar object.

Other Parameters:
**kwargs

Parameters to pass to matplotlib.pyplot.colorbar().