set_aspect
- set_aspect(ax: Axes, aspect: float) None [source]
Adjust the ratio between ylim span length and xlim span length.
The function calculates the current aspect ratio of the Axes object and adjusts its x-axis or y-axis limits to match the desired aspect ratio. If the desired aspect ratio is less than the current, the function increases the width of the x-axis. If it is greater, the height of the y-axis is increased.
Note that axes limits are only ever extended. Data limit extension is performed symmetrically.