mpl_toolkits.axisartist.axis_artist.Ticks#
- class mpl_toolkits.axisartist.axis_artist.Ticks(ticksize, tick_out=False, *, axis=None, **kwargs)[源代码][源代码]#
-
刻度线源自
Line2D,需要注意的是,刻度线本身是标记。因此,你应该使用 set_mec, set_mew 等方法。要更改刻度大小(长度),您需要使用
set_ticksize。要更改刻度的方向(默认情况下,刻度与刻度标签方向相反),请使用set_tick_out(False)- draw(renderer)[源代码][源代码]#
使用给定的渲染器绘制艺术家(及其子项)。
如果艺术家不可见(
Artist.get_visible返回 False),则此操作无效。- 参数:
- 渲染器 :
RendererBase子类。RendererBase 子类。
- 渲染器 :
注释
此方法在 Artist 子类中被重写。
- get_markeredgecolor()[源代码][源代码]#
返回标记边缘颜色。
另请参见
set_markeredgecolor。
- get_markeredgewidth()[源代码][源代码]#
返回标记边缘的宽度,单位为点。
另请参见
set_markeredgewidth。
- set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, dash_capstyle=<UNSET>, dash_joinstyle=<UNSET>, dashes=<UNSET>, data=<UNSET>, drawstyle=<UNSET>, fillstyle=<UNSET>, gapcolor=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, locs_angles=<UNSET>, marker=<UNSET>, markeredgecolor=<UNSET>, markeredgewidth=<UNSET>, markerfacecolor=<UNSET>, markerfacecoloralt=<UNSET>, markersize=<UNSET>, markevery=<UNSET>, mouseover=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, solid_capstyle=<UNSET>, solid_joinstyle=<UNSET>, tick_out=<UNSET>, ticksize=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xdata=<UNSET>, ydata=<UNSET>, zorder=<UNSET>)[源代码]#
一次性设置多个属性。
支持的属性是
属性
描述
一个过滤函数,它接收一个 (m, n, 3) 的浮点数数组和一个 dpi 值,并返回一个 (m, n, 3) 数组和两个从图像左下角开始的偏移量
标量或无
布尔值
抗锯齿或 aa布尔值
BboxBase或 None布尔值
补丁或(路径,变换)或无
颜色或 c未知
CapStyle或 {'butt', 'projecting', 'round'}JoinStyle或 {'miter', 'round', 'bevel'}浮点数序列(点数中的开/关墨水)或 (None, None)
(2, N) 数组或两个一维数组
drawstyle或 ds{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, 默认值: 'default'
{'full', 'left', 'right', 'bottom', 'top', 'none'}
color or None
str
布尔值
对象
linestyle或 ls{'-', '--', '-.', ':', '', (偏移, 开关序列), ...}
linewidth或 lwfloat
未知
标记样式字符串,
Path或MarkerStylemarkeredgecolor或 mecmarkeredgewidth或 mewfloat
markerfacecolor或 mfcmarkerfacecoloralt或 mfcaltmarkersize或 msfloat
None 或 int 或 (int, int) 或 slice 或 list[int] 或 float 或 (float, float) 或 list[bool]
布尔值
浮点数或可调用对象[[Artist, Event], 元组[bool, dict]]
float
布尔值
(scale: float, length: float, randomness: float)
布尔值或无
CapStyle或 {'butt', 'projecting', 'round'}JoinStyle或 {'miter', 'round', 'bevel'}未知
未知
str
布尔值
一维数组
一维数组
float