W3cubDocs

/Matplotlib 3.1

matplotlib.axes.Axes.set_position

Axes.set_position(self, pos, which='both')

Set the axes position.

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

Parameters:
pos : [left, bottom, width, height] or Bbox

The new position of the in Figure coordinates.

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

Determines which position variables to change.

Examples using matplotlib.axes.Axes.set_position

© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.axes.Axes.set_position.html