matplotlib.figure.Figure.get_tightbbox#
- Figure.get_tightbbox(renderer=None, *, bbox_extra_artists=None)[源码]#
返回图形的(紧密)边界框,以英寸为单位。
请注意,
FigureBase
不同于所有其他 Artist 对象,后者返回以像素为单位的Bbox
。具有
artist.set_in_layout(False)
的艺术家对象不会包含在边界框中。- 参数:
- renderer
RendererBase
子类 将用于绘制图形的渲染器(即
fig.canvas.get_renderer()
)- bbox_extra_artists
Artist
或None
的列表 要包含在紧密边界框中的 Artist 列表。如果为
None
(默认),则每个 Axes 的所有 Artist 子对象都包含在紧密边界框中。
- renderer
- 返回:
BboxBase
包含边界框(以图形英寸为单位)。