scisalt.matplotlib.setup_figure

scisalt.matplotlib.setup_figure(rows=1, cols=1, **kwargs)[source]

Sets up a figure with a number of rows (rows) and columns (cols), **kwargs passes through to matplotlib.figure.Figure.

Changed in version 1.3: Supports **kwargs pass-through to matplotlib.figure.Figure.

Changed in version 1.2: Changed gridspec_x to rows, gridspec_y to cols, added figsize control.

Parameters:

rows : int

Number of rows to create.

cols : int

Number of columns to create.

Returns:

fig : matplotlib.figure.Figure

The figure.

gs : matplotlib.gridspec.GridSpec

Instance with gridspec_x rows and gridspec_y columns