You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Applications are open for the 2018 John Hunter Matplotlib Summer Fellowship. Apply now!
Version 2.2.2.post1768+g23420a4c1
Fork me on GitHub

Table Of Contents


Axes.set_position(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.

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