insert_colorbar#

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

Insert a colorbar to one side of a Axes or WCSAxes object, fitting it into the same space.

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.

sizestr

Size percentage 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().