Convenience method to get or set some axis properties.
Call signatures:
xmin, xmax, ymin, ymax = axis() xmin, xmax, ymin, ymax = axis([xmin, xmax, ymin, ymax]) xmin, xmax, ymin, ymax = axis(option) xmin, xmax, ymin, ymax = axis(**kwargs)
The axis limits to be set. This can also be achieved using
ax.set(xlim=(xmin, xmax), ylim=(ymin, ymax))
If a bool, turns axis lines and labels on or off. If a string, possible values are:
Value | Description |
---|---|
'on' | Turn on axis lines and labels. Same as |
'off' | Turn off axis lines and labels. Same as |
'equal' | Set equal scaling (i.e., make circles circular) by changing axis limits. This is the same as |
'scaled' | Set equal scaling (i.e., make circles circular) by changing dimensions of the plot box. This is the same as |
'tight' | Set limits just large enough to show all data, then disable further autoscaling. |
'auto' | Automatic scaling (fill plot box with data). |
'image' | 'scaled' with axis limits equal to data limits. |
'square' | Square plot; similar to 'scaled', but initially forcing |
Whether observers are notified of the axis limit change. This option is passed on to set_xlim
and set_ylim
.
The axis limits.
matplotlib.axes.Axes.axis
© 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.axis.html