网页
综合
更新时间 2026-11-15 00:10:15
matplotlib.figure — Matplotlib 3.11.2 documentation
自动蜘蛛
matplotlib.org
正文约 2553 字
matplotlib.figure implements the following classes:
Top level Artist, which holds all plot elements. Many methods are implemented in FigureBase.
A logical figure inside a figure, usually added to a figure (or parent SubFigure) with Figure.add_subfigure or Figure.subfigures methods.
Figures are typically created using pyplot methods figure, subplots, and subplot_mosaic.
(Source code, 2x.png, png)
Some situations call for directly instantiating a Figure class, usually inside an application of some sort (see Embedding Matplotlib in graphical user interfaces for a list of examples) . More information about Figures can be found at Introduction to Figures.
The top level container for all the plot elements.
Add an Axes to the figure.
Add an Axes to the figure as part of a subplot arrangement.
Add a set of subplots to this figure.
Figure.subplot_mosaic
Build a layout of Axes based on ASCII art or nested lists.
Low-level API for creating a GridSpec that has this figure as a parent.
List of Axes in the Figure.
List of Axes in the Figure.
Remove the Axes ax from the figure; update the current Axes.
Add a set of subfigures to this figure or subfigure.
Figure.add_subfigure
Add a SubFigure to the figure as part of a subplot arrangement.
Save the current figure as an image or vector graphic to a file.
Add a colorbar to a plot.
Place a legend on the figure.
Add a centered super title to the figure.
Return the suptitle as string or an empty string if not set.
Add a centered super xlabel to the figure.
Figure.get_supxlabel
Return the supxlabel as string or an empty string if not set.
Add a centered super ylabel to the figure.
Figure.get_supylabel
Return the supylabel as string or an empty string if not set.
Align the xlabels and ylabels of subplots with the same subplots row or column (respectively) if label alignment is being done automatically (i.e. the label position is not manually set).
Figure.align_xlabels
Align the xlabels of subplots in the same subplot row if label alignment is being done automatically (i.e. the label position is not manually set).
Figure.align_ylabels
Align the ylabels of subplots in the same subplot column if label alignment is being done automatically (i.e. the label position is not manually set).
Align the titles of subplots in the same subplot row if title alignment is being done automatically (i.e. the title position is not manually set).
Figure.autofmt_xdate
Date ticklabels often overlap, so it is useful to rotate them and right align them.
Figure.set_size_inches
Set the figure size in inches.
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。