[ Web Proxy ]
URL:
Viewing: https://matplotlib.org/stable/api/_as_gen/../_as_gen/matplotlib.pyplot.tight_layout.html [Back]  [Original]

matplotlib.pyplot.tight_layout — Matplotlib 3.11.2 documentation
Back to top
Search the docs ...:

matplotlib.pyplot.tight_layout#

matplotlib.pyplot.tight_layout(*, pad=1.08, h_pad=None, w_pad=None, rect=None)[source]#

Adjust the padding between and around subplots.

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

Parameters:
padfloat, default: 1.08

Padding between the figure edge and the edges of subplots, as a fraction of the font size.

h_pad, w_padfloat, default: pad

Padding (height/width) between edges of adjacent subplots, as a fraction of the font size.

recttuple (left, bottom, right, top), default: (0, 0, 1, 1)

A rectangle in normalized figure coordinates into which the whole subplots area (including labels) will fit.

Notes

Note

This is the pyplot wrapper for Figure.tight_layout.

Examples using matplotlib.pyplot.tight_layout#

[]

Interpolations for imshow

Interpolations for imshow
[]

Streamplot

Streamplot
[]

Annotated heatmap

Annotated heatmap
[]

Resize Axes with tight layout

Resize Axes with tight layout
[]

Tick locators

Tick locators
[]

Format ticks using engineering notation

Format ticks using engineering notation
[]

3D wireframe plots in one direction

3D wireframe plots in one direction
[]

Zorder Demo

Zorder Demo
[]

Tight layout guide

Tight layout guide

Web Proxy Viewer  |  New URL  |  Original Page