Skip to content

API reference

scilayout.figure() creates a figure. The classes you work with are also available straight from the package, for example scilayout.ScaleBar, and from these modules:

Module Contents
scilayout.classes SciFigure, PanelAxes, PanelLabel, FigureText
scilayout.scalebars ScaleBar, LinkedScaleBar
scilayout.stats StatsLine
scilayout.style style parameters: params, use, reset
scilayout.locations conversions between cm, inches and figure fraction
scilayout.types Extent and Bound, and their unit aliases

Anything not listed here, including the modules scilayout.base and scilayout.grid, is internal and may change without notice. To read how locations are described see Locations and coordinates.

figure

figure(**kwargs: Any) -> SciFigure

Create a SciFigure object.

This function wraps plt.figure(). See its documentation for the figure arguments.

Parameters:

Name Type Description Default
**kwargs Any

Keyword arguments for matplotlib.pyplot.figure, for example figsize or num. FigureClass cannot be set.

{}

Returns:

Type Description
SciFigure

The new figure (the plot window).

Raises:

Type Description
ValueError

If FigureClass is given.

Examples:

>>> import scilayout
>>> fig = scilayout.figure()
>>> ax_1 = fig.add_panel((1, 2, 4, 5), method="bounds")