On this page
matplotlib.axes.Axes.set_aspect
Axes.set_aspect(aspect, adjustable=None, anchor=None)
-
aspect
value description ‘auto’ automatic; fill position rectangle with data ‘equal’ same scaling from data to plot units for x and y num a circle will be stretched such that the height is num times the width. aspect=1 is the same as aspect=’equal’. adjustable
value description ‘box’ change physical size of axes ‘datalim’ change xlim or ylim ‘box-forced’ same as ‘box’, but axes can be shared ‘box’ does not allow axes sharing, as this can cause unintended side effect. For cases when sharing axes is fine, use ‘box-forced’.
anchor
value description ‘C’ centered ‘SW’ lower left corner ‘S’ middle of bottom edge ‘SE’ lower right corner etc.
© 2012–2017 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
http://matplotlib.org/2.1.0/api/_as_gen/matplotlib.axes.Axes.set_aspect.html