Autoscale the view limits using the data limits.
If True, only expand the axis limits using the margins. Note that unlike for autoscale
, tight=True
does not set the margins to zero.
If False and rcParams["axes.autolimit_mode"]
(default: 'data'
) is 'round_numbers', then after expansion by the margins, further expand the axis limits using the axis major locator.
If None (the default), reuse the value set in the previous call to autoscale_view
(the initial value is False, but the default style sets rcParams["axes.autolimit_mode"]
(default: 'data'
) to 'data', in which case this behaves like True).
Whether to autoscale the x axis.
Whether to autoscale the y axis.
The autoscaling preserves any preexisting axis direction reversal.
The data limits are not updated automatically when artist data are changed after the artist has been added to an Axes instance. In that case, use matplotlib.axes.Axes.relim()
prior to calling autoscale_view.
If the views of the Axes are fixed, e.g. via set_xlim
, they will not be changed by autoscale_view(). See matplotlib.axes.Axes.autoscale()
for an alternative.
matplotlib.axes.Axes.autoscale_view
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.axes.Axes.autoscale_view.html