matplotlib.axes.Axes.set_position#

Axes.set_position(pos,which='both')[source]#

Set the Axes position.

Axes have two position attributes. The 'original' position is theposition allocated for the Axes. The 'active' position is theposition the Axes is actually drawn at. These positions are usuallythe same unless a fixed aspect is set to the Axes. SeeAxes.set_aspect for details.

Parameters:
pos[left, bottom, width, height] orBbox

The new position of the Axes inFigure coordinates.

which{'both', 'active', 'original'}, default: 'both'

Determines which position variables to change.

Examples usingmatplotlib.axes.Axes.set_position#

Contour Demo

Contour Demo