axes.Axes.axis

matplotlib.axes.Axes.axis

Axes.axis(*v, **kwargs)

Set axis properties.

Valid 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 of float or {‘on’, ‘off’, ‘equal’, ‘tight’, ‘scaled’, ‘normal’, ‘auto’, ‘image’, ‘square’}

Optional positional argument

Axis data limits set from a list; or a command relating to axes:

Value Description
‘on’ Toggle axis lines and labels on
‘off’ Toggle axis lines and labels off
‘equal’ Equal scaling by changing limits
‘scaled’ Equal scaling by changing box dimensions
‘tight’ Limits set such that all data is shown
‘auto’ Automatic scaling, fill rectangle 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–2017 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
http://matplotlib.org/2.0.2/api/_as_gen/matplotlib.axes.Axes.axis.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部