scisalt.matplotlib.colorbar

scisalt.matplotlib.colorbar(ax, im, fig=None, loc='right', size='5%', pad='3%')[source]

Adds a polite colorbar that steals space so matplotlib.pyplot.tight_layout works nicely.

New in version 1.3.

Parameters:

ax : matplotlib.axis.Axis

The axis to plot to.

im : matplotlib.image.AxesImage

The plotted image to use for the colorbar.

fig : matplotlib.figure.Figure, optional

The figure to plot to.

loc : str, optional

The location to place the axes.

size : str, optional

The size to allocate for the colorbar.

pad : str, optional

The amount to pad the colorbar.