matplotlib.figure.Figure.get_tightbbox#
- Figure.get_tightbbox(renderer=None, *, bbox_extra_artists=None)[source]#
Return a (tight) bounding box of the figure in inches.
Note that
FigureBasediffers from all other artists, which return theirBboxin pixels.Artists that have
artist.set_in_layout(False)are not included in the bbox.- Parameters:
- renderer
RendererBasesubclass Renderer that will be used to draw the figures (i.e.
fig.canvas.get_renderer())- bbox_extra_artistslist of
ArtistorNone List of artists to include in the tight bounding box. If
None(default), then all artist children of each Axes are included in the tight bounding box.
- renderer
- Returns:
BboxBasecontaining the bounding box (in figure inches).