Matplotlib.pyplot.tight_layout() Syntax in Python
Syntax: matplotlib.pyplot.tight_layout(pad=1.08, h_pad=None, w_pad=None, rect=None)
Parameters:
- pad: This parameter is used for padding between the figure edge and the edges of subplots, as a fraction of the font size.
- h_pad, w_pad: These parameter are used for padding (height/width) between edges of adjacent subplots, as a fraction of the font size.
- rect: This parameter is rectangle in the normalized figure coordinate that the whole subplots area will fit into.
Returns: This method does not return any value.
Matplotlib.pyplot.tight_layout() in Python
Matplotlib tight_layout() function in pyplot module of the Matplotlib library is used to automatically adjust subplot parameters to give specified padding.
Contact Us