matplotlib 3.5.1

NotesParametersBackRef
autoscale_view(self, tight=None, scalex=True, scaley=True)

Notes

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.

Parameters

tight : bool or None

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 axes.autolimit_mode 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 axes.autolimit_mode to 'data', in which case this behaves like True).

scalex : bool, default: True

Whether to autoscale the x axis.

scaley : bool, default: True

Whether to autoscale the y axis.

Autoscale the view limits using the data limits.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.axes._base._AxesBase.autoscale matplotlib.pyplot.autoscale matplotlib.pyplot.plot matplotlib.axes._base._AxesBase.autoscale_view matplotlib.axes._axes.Axes.plot

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/axes/_base.py#2801
type: <class 'function'>
Commit: