Set the aspect ratio of the axes scaling, i.e. y/x-scale.
Possible values:
aspect=1, i.e. same scaling for x and y.aspect=2 a square in data coordinates will be rendered with a height of twice its width.If not None, this defines which parameter will be adjusted to meet the required aspect. See set_adjustable for further details.
If not None, this defines where the Axes will be drawn if there is extra space due to aspect constraints. The most common way to to specify the anchor are abbreviations of cardinal directions:
value | description |
|---|---|
'C' | centered |
'SW' | lower left corner |
'S' | middle of bottom edge |
'SE' | lower right corner |
etc. |
See set_anchor for further details.
If True, apply the settings to all shared Axes.
See also
matplotlib.axes.Axes.set_adjustableSet how the Axes adjusts to achieve the required aspect ratio.
matplotlib.axes.Axes.set_anchorSet the position in case of extra space.
matplotlib.axes.Axes.set_aspect
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.axes.Axes.set_aspect.html