matplotlib 3.5.1

NotesParametersReturnsBackRef
figure(num=None, figsize=None, dpi=None, facecolor=None, edgecolor=None, frameon=True, FigureClass=<class 'matplotlib.figure.Figure'>, clear=False, **kwargs)

Notes

If you are creating many figures, make sure you explicitly call .pyplot.close on the figures you are not using, because this will enable pyplot to properly clean up the memory.

:None:None:`~matplotlib.rcParams` defines the default values, which can be modified in the matplotlibrc file.

Parameters

num : int or str or `.Figure`, optional

A unique identifier for the figure.

If a figure with that identifier already exists, this figure is made active and returned. An integer refers to the Figure.number attribute, a string refers to the figure label.

If there is no figure with the identifier or num is not given, a new figure is created, made active and returned. If num is an int, it will be used for the Figure.number attribute, otherwise, an auto-generated integer value is used (starting at 1 and incremented for each new figure). If num is a string, the figure label and the window title is set to this value.

figsize : (float, float), default: :rc:`figure.figsize`

Width, height in inches.

dpi : float, default: :rc:`figure.dpi`

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

facecolor : color, default: :rc:`figure.facecolor`

The background color.

edgecolor : color, default: :rc:`figure.edgecolor`

The border color.

frameon : bool, default: True

If False, suppress drawing the figure frame.

FigureClass : subclass of `~matplotlib.figure.Figure`

Optionally use a custom .Figure instance.

clear : bool, default: False

If True and the figure already exists, then it is cleared.

tight_layout : bool or dict, default: :rc:`figure.autolayout`

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

constrained_layout : bool, default: :rc:`figure.constrained_layout.use`

If True use constrained layout to adjust positioning of plot elements. Like tight_layout , but designed to be more flexible. See /tutorials/intermediate/constrainedlayout_guide for examples. (Note: does not work with add_subplot or ~.pyplot.subplot2grid .)

**kwargs : optional

See Figure for other possible arguments.

Returns

`~matplotlib.figure.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.

Create a new figure, or activate an existing figure.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

dask

dask.array.random.RandomState.power
dask.array.random.RandomState.noncentral_chisquare

scipy

64 Elements
scipy.signal.windows._windows.kaiser
scipy.signal.cosine
scipy.signal.exponential
scipy.signal._filter_design.iirfilter
scipy.signal._ltisys.lti.bode
scipy.spatial._qhull.HalfspaceIntersection
scipy.signal.windows._windows.boxcar
scipy.signal._ltisys.dlti.bode
scipy.signal._spectral_py.periodogram
scipy.spatial._qhull.ConvexHull
scipy.signal._max_len_seq.max_len_seq
scipy.signal.windows._windows.general_cosine
scipy.signal.windows._windows.nuttall
scipy.signal.blackman
scipy.signal.flattop
scipy.signal.bartlett
scipy.signal._spectral_py.istft
scipy.spatial._kdtree.KDTree.query_ball_tree
scipy.signal.windows._windows.triang
scipy.signal.windows._windows.general_gaussian
scipy.signal.windows._windows.gaussian
scipy.signal.windows._windows.flattop
scipy.signal.windows._windows.exponential
scipy.signal._ltisys.dfreqresp
scipy.signal._ltisys.freqresp
scipy.signal.windows._windows.blackman
scipy.signal.windows._windows.cosine
scipy.signal.windows._windows.barthann
scipy.spatial._geometric_slerp.geometric_slerp
scipy.signal.gaussian
scipy.special._basic.diric
scipy.signal.kaiser
scipy.signal.chebwin
scipy.signal._fir_filter_design.remez
scipy.signal.boxcar
scipy.interpolate._fitpack2.RectSphereBivariateSpline
scipy.signal.general_gaussian
scipy.signal.windows._windows.parzen
scipy.signal._signaltools.lfilter
scipy.signal.windows._windows.tukey
scipy.signal._ltisys.bode
scipy.signal._filter_design.freqz_zpk
scipy.signal.windows._windows.hann
scipy.signal.windows._windows.taylor
scipy.signal._waveforms.square
scipy.signal._filter_design.bessel
scipy.signal.hann
scipy.signal.nuttall
scipy.spatial._kdtree.KDTree.query_pairs
scipy.signal.windows._windows.blackmanharris
scipy.signal._spectral_py.welch
scipy.signal.windows._windows.bartlett
scipy.signal.tukey
scipy.signal.blackmanharris
scipy.signal.triang
scipy.signal._signaltools.resample_poly
scipy.signal.windows._windows.chebwin
scipy.signal.parzen
scipy.signal.windows._windows.bohman
scipy.signal.bohman
scipy.signal.windows._windows.hamming
scipy.signal.hamming
scipy.signal._ltisys.dbode
scipy.signal.barthann

matplotlib

matplotlib
matplotlib.figure.Figure.show
matplotlib.pyplot.subplots
matplotlib.pyplot
matplotlib.backends.backend_pdf.PdfPages

skimage

skimage.filters._gabor.gabor
skimage.filters._gabor.gabor_kernel

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/pyplot.py#665
type: <class 'function'>
Commit: