On this page
matplotlib.axes.Axes.axis
Axes.axis(*v, **kwargs)
-
Convenience method to get or set some axis properties.
Call signatures:
xmin, xmax, ymin, ymax = axis() xmin, xmax, ymin, ymax = axis(list_arg) xmin, xmax, ymin, ymax = axis(string_arg) xmin, xmax, ymin, ymax = axis(**kwargs)
Parameters: -
v : List[float] or one of the strings listed below.
-
Optional positional-only argument
If a list, set the axis data limits. If a string:
Value Description 'on' Turn on axis lines and labels. 'off' Turn off axis lines and labels. 'equal' Set equal scaling (i.e., make circles circular) by changing axis limits. 'scaled' Set equal scaling (i.e., make circles circular) by changing dimensions of the plot box. 'tight' Set limits just large enough to show all data. 'auto' Automatic scaling (fill plot box with data). 'normal' Same as 'auto'; deprecated. 'image' 'scaled' with axis limits equal to data limits. 'square' Square plot; similar to 'scaled', but initially forcing xmax-xmin = ymax-ymin
. -
emit : bool, optional
-
Passed to set_{x,y}lim functions, if observers are notified of axis limit change.
-
xmin, ymin, xmax, ymax : float, optional
-
The axis limits to be set.
Returns: -
xmin, xmax, ymin, ymax : float
-
The axis limits.
-
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.0.0/api/_as_gen/matplotlib.axes.Axes.axis.html