matplotlib.axes.Axes.apply_aspect

Axes.apply_aspect(self, position=None)

Adjust the Axes for a specified data aspect ratio.

Depending on get_adjustable this will modify either the Axes box (position) or the view limits. In the former case, get_anchor will affect the position.

See also

matplotlib.axes.Axes.set_aspect
For a description of aspect ratio handling.
matplotlib.axes.Axes.set_adjustable
Set how the Axes adjusts to achieve the required aspect ratio.
matplotlib.axes.Axes.set_anchor
Set the position in case of extra space.

Notes

This is called automatically when each Axes is drawn. You may need to call it yourself if you need to update the Axes position and/or view limits before the Figure is drawn.

Examples using matplotlib.axes.Axes.apply_aspect

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