mpl_gui.figure#

mpl_gui.figure(*, label=None, figsize=None, dpi=None, facecolor=None, edgecolor=None, frameon=True, FigureClass=<class 'mpl_gui._figure.Figure'>, clear=False, auto_draw=True, **kwargs)[source]#

Create a new figure

Parameters:
labelstr, optional

Label for the figure. Will be used as the window title

figsize(float, float), default: rcParams["figure.figsize"] (default: [6.4, 4.8])

Width, height in inches.

dpifloat, default: rcParams["figure.dpi"] (default: 100.0)

The resolution of the figure in dots-per-inch.

facecolorcolor, default: rcParams["figure.facecolor"] (default: 'white')

The background color.

edgecolorcolor, default: rcParams["figure.edgecolor"] (default: 'white')

The border color.

frameonbool, default: True

If False, suppress drawing the figure frame.

FigureClasssubclass of Figure

Optionally use a custom Figure instance.

tight_layoutbool or dict, default: rcParams["figure.autolayout"] (default: False)

If False use subplotpars. If True adjust subplot parameters using tight_layout with default padding. When providing a dict containing the keys pad, w_pad, h_pad, and rect, the default tight_layout paddings will be overridden.

**kwargs : optional

See Figure for other possible arguments.

Returns:
Figure

The Figure instance returned will also be passed to new_figure_manager in the backends, which allows to hook custom Figure classes into the pyplot interface. Additional kwargs will be passed to the Figure init function.