matplotlib.gridspec.SubplotParams#

classmatplotlib.gridspec.SubplotParams(left=None,bottom=None,right=None,top=None,wspace=None,hspace=None)[source]#

Bases:object

Parameters defining the positioning of a subplots grid in a figure.

Defaults are given byrcParams["figure.subplot.[name]"].

Parameters:
leftfloat, optional

The position of the left edge of the subplots,as a fraction of the figure width.

rightfloat, optional

The position of the right edge of the subplots,as a fraction of the figure width.

bottomfloat, optional

The position of the bottom edge of the subplots,as a fraction of the figure height.

topfloat, optional

The position of the top edge of the subplots,as a fraction of the figure height.

wspacefloat, optional

The width of the padding between subplots,as a fraction of the average Axes width.

hspacefloat, optional

The height of the padding between subplots,as a fraction of the average Axes height.

reset()[source]#

Restore the subplot positioning parameters to the default rcParams values

to_dict()[source]#

Return a copy of the subplot parameters as a dict.

update(left=None,bottom=None,right=None,top=None,wspace=None,hspace=None)[source]#

Update the dimensions of the passed parameters.None means unchanged.

Examples usingmatplotlib.gridspec.SubplotParams#

Programmatically control subplot adjustment

Programmatically control subplot adjustment