mpl_toolkits.axisartist.axislines.Axes

class mpl_toolkits.axisartist.axislines.Axes(*args, grid_helper=None, **kwargs)[源代码]

基类:matplotlib.axes._axes.Axes

在图形中构建轴。

参数:
figFigure图形

轴内置于 Figure fig .

rect[左、下、宽、高]

轴内置在矩形中 rect . rect 是在 Figure 协调。

斯莱西Axes 可选可选轴

X或Y axis 与输入中的X或Y轴共享 Axes .

frameonbool,默认值:True

轴框架是否可见。

box_aspect无,或数字,可选

设置轴框的纵横比。看到了吗 set_box_aspect 有关详细信息。

**kwargs

其他可选关键字参数:

财产 描述
adjustable 'box'、'datalim'
agg_filter 一种过滤函数,它接受一个(m,n,3)浮点数组和一个dpi值,并返回一个(m,n,3)数组。
alpha 浮动或无
anchor 2-浮点数或'c'、'sw'、's'、'se'、…
animated 布尔
aspect {auto}或num
autoscale_on 布尔
autoscalex_on 布尔
autoscaley_on 布尔
axes_locator 可赎回的 [[轴,渲染器]] Bbox
axisbelow 布尔或“线”
box_aspect 没有,或者是一个数字
clip_box Bbox
clip_on 布尔
clip_path 面片或(路径、变换)或无
contains 未知的
facecolor 或fc 颜色
figure Figure
frame_on 布尔
gid STR
in_layout 布尔
label 对象
navigate 布尔
navigate_mode 未知的
path_effects AbstractPathEffect
picker 无、布尔或可呼叫
position [左、下、宽、高] 或 Bbox
prop_cycle 未知的
rasterization_zorder 浮动或无
rasterized 布尔或无
sketch_params (比例:浮动,长度:浮动,随机性:浮动)
snap 布尔或无
title STR
transform Transform
url STR
visible 布尔
xbound 未知的
xlabel STR
xlim (底部:浮动,顶部:浮动)
xmargin 浮动大于-0.5
xscale “Linear”,“Log”,“SymLog”,“Logit”,…
xticklabels 未知的
xticks 未知的
ybound 未知的
ylabel STR
ylim (底部:浮动,顶部:浮动)
ymargin 浮动大于-0.5
yscale “Linear”,“Log”,“SymLog”,“Logit”,…
yticklabels 未知的
yticks 未知的
zorder 浮动
返回:
Axes

新的 Axes 对象。

__call__(*args, **kwargs)[源代码]

称自己为函数。

__init__(*args, grid_helper=None, **kwargs)[源代码]

在图形中构建轴。

参数:
figFigure图形

轴内置于 Figure fig .

rect[左、下、宽、高]

轴内置在矩形中 rect . rect 是在 Figure 协调。

斯莱西Axes 可选可选轴

X或Y axis 与输入中的X或Y轴共享 Axes .

frameonbool,默认值:True

轴框架是否可见。

box_aspect无,或数字,可选

设置轴框的纵横比。看到了吗 set_box_aspect 有关详细信息。

**kwargs

其他可选关键字参数:

财产 描述
adjustable 'box'、'datalim'
agg_filter 一种过滤函数,它接受一个(m,n,3)浮点数组和一个dpi值,并返回一个(m,n,3)数组。
alpha 浮动或无
anchor 2-浮点数或'c'、'sw'、's'、'se'、…
animated 布尔
aspect {auto}或num
autoscale_on 布尔
autoscalex_on 布尔
autoscaley_on 布尔
axes_locator 可赎回的 [[轴,渲染器]] Bbox
axisbelow 布尔或“线”
box_aspect 没有,或者是一个数字
clip_box Bbox
clip_on 布尔
clip_path 面片或(路径、变换)或无
contains 未知的
facecolor 或fc 颜色
figure Figure
frame_on 布尔
gid STR
in_layout 布尔
label 对象
navigate 布尔
navigate_mode 未知的
path_effects AbstractPathEffect
picker 无、布尔或可呼叫
position [左、下、宽、高] 或 Bbox
prop_cycle 未知的
rasterization_zorder 浮动或无
rasterized 布尔或无
sketch_params (比例:浮动,长度:浮动,随机性:浮动)
snap 布尔或无
title STR
transform Transform
url STR
visible 布尔
xbound 未知的
xlabel STR
xlim (底部:浮动,顶部:浮动)
xmargin 浮动大于-0.5
xscale “Linear”,“Log”,“SymLog”,“Logit”,…
xticklabels 未知的
xticks 未知的
ybound 未知的
ylabel STR
ylim (底部:浮动,顶部:浮动)
ymargin 浮动大于-0.5
yscale “Linear”,“Log”,“SymLog”,“Logit”,…
yticklabels 未知的
yticks 未知的
zorder 浮动
返回:
Axes

新的 Axes 对象。

__module__ = 'mpl_toolkits.axisartist.axislines'
property axis

获取或设置某些轴属性的方便方法。

呼叫签名:

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)
参数:
xmin、xmax、ymin、ymax可选浮动

要设置的轴限制。也可以使用以下方法实现:

ax.set(xlim=(xmin, xmax), ylim=(ymin, ymax))
option布尔或STR

如果是bool,则打开或关闭轴线和标签。如果是字符串,可能的值是:

价值 描述
“on” 启用轴线和标签。等同于 True .
“关” 关闭轴线和标签。等同于 False .
“平等” 通过更改轴限制来设置等比例缩放(即使圆成为圆形)。这和 ax.set_aspect('equal', adjustable='datalim') . 在这种情况下,可能不考虑显式数据限制。
“缩放” 通过更改绘图框的尺寸设置等比例缩放(即使圆成为圆形)。这和 ax.set_aspect('equal', adjustable='box', anchor='C') . 此外,将禁用进一步的自动缩放。
“紧” 设置足够大的限制以显示所有数据,然后禁用进一步的自动缩放。
“汽车” 自动缩放(用数据填充绘图框)。
“图像” 轴限制等于数据限制的“缩放”。
“广场” 方形图;类似于“按比例缩放”,但最初强制 xmax-xmin == ymax-ymin .
emitbool,默认值:True

是否通知观察者轴极限变化。此选项传递给 set_xlimset_ylim .

返回:
xmin、xmax、ymin、ymax浮动

轴限制。

cla()[源代码]

清除当前轴。

get_children()[源代码]

返回孩子的列表 Artist 这是什么 Artist .

get_grid_helper()[源代码]
grid(b=None, which='major', axis='both', **kwargs)[源代码]

切换网格线,并可以选择设置这些线的属性。

invalidate_grid_helper()[源代码]
new_fixed_axis(loc, offset=None)[源代码]
new_floating_axis(nth_coord, value, axis_direction='bottom')[源代码]
new_gridlines(grid_helper=None)[源代码]

创建并返回新的GridLineCollection实例。

哪一个 :“大”或“小” axis :“两者”,“X”或“Y”

toggle_axisline(b=None)[源代码]

使用实例 mpl_toolkits.axisartist.axislines.Axes