syncopy.plotting.spy_plotting._setup_colorbar

syncopy.plotting.spy_plotting._setup_colorbar(fig, ax, cax, label=None, outline=False, vmin=None, vmax=None)[source]

Create and format a Colorbar object for Syncopy visualizations

Parameters
  • fig (Figure) – Matplotlib figure object created by _setup_figure()

  • ax ((list of) Axis) – Either single Axis object or list of multiple Axis objects created by _setup_figure()

  • cax (Axis) – Matplotlib Axis object created by _setup_figure() reserved for a colorbar

  • label (None or str) – Caption for colorbar (if not None)

  • outline (bool) – If True, draw border-lines around colorbar.

  • vmin (float or None) – If not None, lower bound of data-range covered by colorbar. If vmin is None, the colorbar uses the lowest data-value found in the last invoked axis.

  • vmax (float or None) – If not None, upper bound of data-range covered by colorbar. If vmax is None, the colorbar uses the highest data-value found in the last invoked axis.

Returns

cbar – Color-bar attached to provided Axis cax

Return type

Colorbar

Notes

This is an auxiliary method that is intended purely for internal use. Please refer to the user-exposed methods singlepanelplot() and/or multipanelplot() to actually generate plots of Syncopy data objects.

See also

_layout_subplot_panels()

Create space-optimal subplot grid for Syncopy visualizations

_setup_figure()

create figures for Syncopy visualizations