You are reading an old version of the documentation (v2.1.0). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.set_position.html
matplotlib
Fork me on GitHub


Travis-CI:

This Page

matplotlib.axes.Axes.set_position

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

Set the axes position

The expected shape of pos is:

pos = [left, bottom, width, height]

in relative 0,1 coords, or pos can be a Bbox

There are two position variables: one which is ultimately used, but which may be modified by apply_aspect(), and a second which is the starting point for apply_aspect().

Optional keyword arguments:

which

value description
‘active’ to change the first
‘original’ to change the second
‘both’ to change both