matplotlib 3.5.1

ParametersReturnsBackRef
axis(self, *args, emit=True, **kwargs)

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)

Parameters

xmin, xmax, ymin, ymax : float, optional

The axis limits to be set. This can also be achieved using :

ax.set(xlim=(xmin, xmax), ylim=(ymin, ymax))
option : bool or str

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 True . 'off' Turn off axis lines and labels. Same as False . 'equal' Set equal scaling (i.e., make circles circular) by changing axis limits. This is the same as ax.set_aspect('equal', adjustable='datalim') . Explicit data limits may not be respected in this case. 'scaled' Set equal scaling (i.e., make circles circular) by changing dimensions of the plot box. This is the same as ax.set_aspect('equal', adjustable='box', anchor='C') . Additionally, further autoscaling will be disabled. '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 xmax-xmin == ymax-ymin . ======== ==========================================================

emit : bool, default: True

Whether observers are notified of the axis limit change. This option is passed on to :None:None:`~.Axes.set_xlim` and :None:None:`~.Axes.set_ylim`.

Returns

xmin, xmax, ymin, ymax : float

The axis limits.

Convenience method to get or set some axis properties.

See Also

matplotlib.axes.Axes.set_xlim
matplotlib.axes.Axes.set_ylim

Examples

See :

Back References

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

scipy.signal._filter_design.butter scipy.signal._filter_design.ellip scipy.signal._filter_design.iirfilter scipy.signal._filter_design.cheby2 scipy.signal._lti_conversion.cont2discrete scipy.signal._filter_design.cheby1 scipy.signal._filter_design.freqz scipy.signal._filter_design.iirdesign

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#1969
type: <class 'function'>
Commit: