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 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
Axes.set_aspectfor details.- Parameters:
- pos[left, bottom, width, height] or
Bbox The new position of the Axes in
Figurecoordinates.- which{'both', 'active', 'original'}, default: 'both'
Determines which position variables to change.
Note
This parameter is considered internal. End users should not use it.
For native Matplotlib
Axes, the active position is determined by a combination of the original position and the aspect ratio. Any active position set by the user will therefore be overwritten by internal handling. This option is retained as it may be relevant for some third partyAxessubclasses.
- pos[left, bottom, width, height] or