matplotlib.pyplot.gca

matplotlib.pyplot.gca(**kwargs)[源代码]

获取当前轴,必要时创建一个。

为确保返回的轴与给定投影等保持一致,以及在不存在活动轴的情况下创建轴,支持以下Kwarg:

财产 描述
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 浮动

使用实例 matplotlib.pyplot.gca