matplotlib.pyplot.tight_layout

matplotlib.pyplot.tight_layout(pad=1.08, h_pad=None, w_pad=None, rect=None)

Automatically adjust subplot parameters to give specified padding.

Parameters:

pad : float
padding between the figure edge and the edges of subplots, as a fraction of the font-size.
h_pad, w_pad : float
padding (height/width) between edges of adjacent subplots. Defaults to pad_inches.
rect : if rect is given, it is interpreted as 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).

Examples using matplotlib.pyplot.tight_layout

© 2012–2017 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
http://matplotlib.org/2.1.0/api/_as_gen/matplotlib.pyplot.tight_layout.html