matplotlib.axes.Axes.axis
- Axes.axis(arg=None, /, *, emit=True, **kwargs)
Convenience method to get or set some axis properties.
Call signatures:
xmin, xmax
Convenience method to get or set some axis properties.
Call signatures:
xmin, xmax
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 |
|---|---|
'off' or | Hide all axis decorations, i.e. axis labels, spines,
tick marks, tick labels, and grid lines.
This is the same as |
Whether observers are notified of the axis limit change.
This option is passed on to set_xlim and
set_ylim.
The axis limits.
For 3D Axes, this method additionally takes zmin, zmax as parameters and likewise returns them.
matplotlib.axes.Axes.axisTrueDo not hide all axis decorations, i.e. axis labels, spines,
tick marks, tick labels, and grid lines.
This is the same as |
'equal' | Set equal scaling (i.e., make circles circular) by
changing the 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
|