Figure.tight_layout(renderer=<deprecated parameter>, pad=1.08, h_pad=None, w_pad=None, rect=None)[source]

Automatically adjust subplot parameters to give specified padding.

To exclude an artist on the axes from the bounding box calculation that determines the subplot parameters (i.e. legend, or annotation), then set a.set_in_layout(False) for that artist.

  • renderer (subclass of RendererBase, optional) – Defaults to the renderer for the figure. Deprecated.

  • pad (float, optional) – Padding between the figure edge and the edges of subplots, as a fraction of the font size.

  • h_pad, w_pad (float, optional) – Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to pad.

  • rect (tuple (left, bottom, right, top), optional) – A rectangle (left, bottom, right, top) in the normalized figure coordinate that the whole subplots area (including labels) will fit into. Default is (0, 0, 1, 1).

See also

Figure.set_tight_layout, pyplot.tight_layout