_setup_figure(npanels, nrow=None, ncol=None, xLabel=None, yLabel=None, include_colorbar=False, sharex=None, sharey=None, grid=None)¶
Create and set up a
Figureobject for Syncopy visualizations
include_colorbar (bool) – If True, axis panel(s) are set up to leave enough space for a colorbar
Figureobject) – Matplotlib figure formatted for Syncopy plotting routines
cax (None or
Axis) – If include_colorbar is True, all axis panels are laid out to leave space for an additional axis cax reserved for a colorbar.
If npanels is greater than one, the local helper function
_layout_subplot_panels()is invoked to create a space-optimal panel grid (adjusted for an additional axis reserved for a colorbar, if include_colorbar is True).
To ease internal processing, this routine attaches a number of additional attributes to the generated
Figureobject fig, namely:
fig.singlepanelplot (bool): if
npanels = 1the caller was
singlepanelplot()and the identically named attribute is created
fig.multipanelplot (bool): conversely, if
npanels > 1the caller was
multipanelplot()and the identically named attribute is created
fig.objCount (int): internal counter used for overlay-plotting. Initially, fig.objCount is set to 0, every overly increments fig.objCount by one
fig.npanels (int): number of panels as given by the input argument npanels
Note that this is an auxiliary method that is intended purely for internal use. Please refer to the user-exposed methods
multipanelplot()to actually generate plots of Syncopy data objects.