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


Travis-CI:

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.