mpl_toolkits.axisartist.axis_artist.GridlinesCollection#

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

基类: LineCollection

网格线的集合。

参数:
which{"major", "minor"}

要考虑的网格线。

axis{"both", "x", "y"}

要考虑的轴。

*args, **kwargs

传递给 LineCollection

draw(renderer)[source]#

使用给定的渲染器绘制 Artist(及其子对象)。

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

参数:
rendererRendererBase 子类。

备注

此方法在 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>, hatch_linewidth=<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>)[source]#

一次性设置多个属性。

支持的属性包括:

属性

描述

agg_filter

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

alpha

类数组或浮点数或 None

animated

布尔值

antialiasedaaantialiaseds

布尔值或布尔值列表

array

类数组或 None

axis

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

capstyle

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

clim

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

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

cmap

Colormap 或 字符串 或 None

color

颜色颜色 列表

颜色

颜色颜色 列表

edgecolorecedgecolors

颜色颜色 列表 或 'face'

facecolorfacecolorsfc

颜色颜色 列表

figure

FigureSubFigure

gapcolor

颜色颜色 列表 或 None

gid

str

grid_helper

GridHelperBase 子类

hatch

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

hatch_linewidth

未知

in_layout

布尔值

joinstyle

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

label

object

linestyledasheslinestylesls

字符串或元组或其列表

linewidthlinewidthslw

浮点数或浮点数列表

mouseover

布尔值

norm

Normalize 或 字符串 或 None

offset_transformtransOffset

变换

offsets

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

path_effects

AbstractPathEffect 列表

paths

未知

picker

None 或 布尔值 或 浮点数 或 可调用对象

pickradius

浮点数

rasterized

布尔值

segments(线段)

未知

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

transform

变换

url

str

字符串列表或 None

urls

verts

未知

visible

布尔值

which

{"major", "minor"}

zorder

浮点数

set_axis(axis)[source]#

选择轴。

参数:
axis{"both", "x", "y"}
set_grid_helper(grid_helper)[source]#

设置网格辅助器。

参数:
grid_helperGridHelperBase 子类
set_which(which)[source]#

选择主网格线或次网格线。

参数:
which{"major", "minor"}