W3cubDocs

/Matplotlib 3.1

matplotlib.axes.Axes.autoscale

Axes.autoscale(self, enable=True, axis='both', tight=None)

Autoscale the axis view to the data (toggle).

Convenience method for simple axis view autoscaling. It turns autoscaling on or off, and then, if autoscaling for either axis is on, it performs the autoscaling on the specified axis or axes.

Parameters:
enable : bool or None, optional

True (default) turns autoscaling on, False turns it off. None leaves the autoscaling state unchanged.

axis : {'both', 'x', 'y'}, optional

which axis to operate on; default is 'both'

tight : bool or None, optional

If True, set view limits to data limits; if False, let the locator and margins expand the view limits; if None, use tight scaling if the only artist is an image, otherwise treat tight as False. The tight setting is retained for future autoscaling until it is explicitly changed.

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