You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 3.1.0.post1496+gb03370a04
Fork me on GitHub


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.

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, first set the margins to zero. Then, this argument is forwarded to autoscale_view (regardless of its value); see the description of its behavior there.