vispipe.plot_backend.MPL_Figure.cbar#

MPL_Figure.cbar(mappable, cax=None, ax=None, label=None, label_kwargs={}, **colorbarkwargs)#

Calls plt.colorbar().

Parameters:
  • mappable (ScalarMappable) – A mappable object that will be used by the colorbar.

  • cax (Axes | None) – Axes to place the colorbar. If None a new Axes is created from the current Axes.

  • ax (Axes | None) – Axes`to plot onto. If `None self.gca() is called.

  • label (str | None) – Adds a label to the colorbars y axis.

  • label_kwargs (dict) – Keyword arguments used by cbar.ax.set_ylabel(). rotation labelpad are set to 90 and 18 by default.

  • **colorbarkwargs – Keyword arguments used by plt.colorbar().

Return type:

Colorbar

Returns:

The generated Colorbar instance.