mpl_toolkits.axisartist.axis_artist.GridlinesCollection#

class mpl_toolkits.axisartist.axis_artist.GridlinesCollection(*args, which='major', axis='both', **kwargs)[源代码][源代码]#

基类:LineCollection

网格线的集合。

参数:
哪个{"主要", "次要"}

考虑哪个网格。

{"both", `"x", "y"`}``

考虑哪个轴。

*args, **kwargs

传递给 LineCollection

draw(renderer)[源代码][源代码]#

使用给定的渲染器绘制艺术家(及其子项)。

如果艺术家不可见(Artist.get_visible 返回 False),则此操作无效。

参数:
渲染器 : RendererBase 子类。RendererBase 子类。

注释

此方法在 Artist 子类中被重写。

set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, axis=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, colors=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gapcolor=<UNSET>, gid=<UNSET>, grid_helper=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, mouseover=<UNSET>, norm=<UNSET>, offset_transform=<UNSET>, offsets=<UNSET>, path_effects=<UNSET>, paths=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, segments=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<UNSET>, verts=<UNSET>, visible=<UNSET>, which=<UNSET>, zorder=<UNSET>)[源代码]#

一次设置多个属性。

支持的属性是

属性

描述

agg_filter

一个过滤函数,它接收一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组和两个从图像左下角开始的偏移量

alpha

类数组或标量或无

animated

布尔值

抗锯齿 或 aa 或 antialiaseds

布尔值或布尔值列表

数组

类似数组或 None

{"both", `"x", "y"`}``

capstyle

CapStyle 或 {'butt', 'projecting', 'round'}

clim

(vmin: 浮点数, vmax: 浮点数)

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

补丁或(路径,变换)或无

cmap

Colormap 或 str 或 None

颜色

colorcolor 列表

颜色

colorcolor 列表

edgecolor 或 ec 或 edgecolors

colorcolor 列表 或 '面'

facecolor 或 facecolors 或 fc

colorcolor 列表

figure

FigureSubFigure

gapcolor

colorcolor 列表 或 None

gid

str

网格助手

GridHelperBase 子类

hatch

{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}

in_layout

布尔值

joinstyle

JoinStyle 或 {'miter', 'round', 'bevel'}

标签

对象

linestyle 或虚线或线型或 ls

str 或 tuple 或其列表

linewidth 或 linewidths 或 lw

浮点数或浮点数列表

mouseover

布尔值

norm

Normalize 或 str 或 None

offset_transform 或 transOffset

Transform

偏移量

(N, 2) 或 (2,) 数组类

path_effects

AbstractPathEffect 的列表

路径

未知

picker

None 或 bool 或 float 或 callable

pickradius

浮动

光栅化

布尔值

segments

未知

sketch_params

(scale: float, length: float, randomness: float)

snap

布尔值或无

transform

Transform

url

str

urls

list of str 或 None

verts

未知

可见

布尔值

which

{"主要", "次要"}

zorder

浮动

set_axis(axis)[源代码][源代码]#

选择轴。

参数:
{"both", `"x", "y"`}``
set_grid_helper(grid_helper)[源代码][源代码]#

设置网格辅助工具。

参数:
grid_helper : GridHelperBase 子类GridHelperBase 子类
set_which(which)[源代码][源代码]#

选择主要或次要网格线。

参数:
哪个{"主要", "次要"}