mpl_toolkits.mplot3d.art3d.Path3DCollection#

class mpl_toolkits.mplot3d.art3d.Path3DCollection(*args, zs=0, zdir='z', depthshade=True, **kwargs)[源代码][源代码]#

基类:PathCollection

一组3D路径。

创建一组平面3D路径,其法向量指向*zdir*方向,并位于*zdir*轴上的*zs*位置。'zs'可以是一个标量,也可以是一个与集合中路径数量相同长度的类数组对象。

构造函数的参数与 PathCollection 相同。此外,关键字 zs=0zdir='z' 可用。

此外,关键字参数 depthshade 可用于指示是否对补丁进行着色以赋予深度感(默认值为 True)。这在散点图中通常是需要的。

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

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

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

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

注释

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

get_depthshade()[源代码][源代码]#
get_edgecolor()[源代码][源代码]#
get_facecolor()[源代码][源代码]#
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, depthshade=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gid=<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>, sizes=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, sort_zpos=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[源代码]#

一次性设置多个属性。

支持的属性有

属性

描述

3d_properties

浮点数或浮点数数组

agg_filter

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

alpha

类数组或标量或无

animated

布尔

抗锯齿 或 aa 或 antialiaseds

布尔值或布尔值列表

数组

类数组或无

capstyle

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

clim

(vmin: float, vmax: float)

clip_box

BboxBase 或 None

clip_on

布尔

clip_path

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

cmap

Colormap 或 str 或 None

颜色

color 或 RGBA 元组列表

depthshade

布尔

edgecolor 或 ec 或 edgecolors

colorcolor 列表 或 'face'

facecolor 或 facecolors 或 fc

colorcolor 列表

figure

FigureSubFigure

gid

str

hatch

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

in_layout

布尔

joinstyle

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

标签

对象

linestyle 或虚线或线型或 ls

str 或 tuple 或其列表

linewidth 或 linewidths 或 lw

未知

鼠标悬停

布尔

norm

Normalize 或 str 或 None

offset_transform 或 transOffset

Transform

偏移量

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

path_effects

AbstractPathEffect 的列表

路径

未知

picker

None 或 bool 或 float 或 callable

pickradius

浮动

光栅化

布尔

sizes

未知

sketch_params

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

snap

布尔值或无

sort_zpos

未知

transform

Transform

url

str

urls

list of str or None

可见

布尔

zorder

浮动

set_3d_properties(zs, zdir)[源代码][源代码]#

设置路径的 z 位置和方向。

参数:
zs浮点数或浮点数数组

zdir 轴上放置路径集合的位置或多个位置。

zdir{'x', 'y', 'z'}

要绘制正交路径的平面。所有路径必须具有相同的方向。有关值的描述,请参见 get_dir_vector

set_depthshade(depthshade)[源代码][源代码]#

设置是否对集合成员执行深度着色。

参数:
depthshade布尔

是否为补丁添加阴影以营造深度感。

set_linewidth(lw)[源代码][源代码]#

设置集合的线宽。lw 可以是一个标量或一个序列;如果它是一个序列,补丁将循环通过该序列。

参数:
lw浮点数或浮点数列表
set_sizes(sizes, dpi=72.0)[源代码][源代码]#

设置集合中每个成员的大小。

参数:
sizes : numpy.ndarray 或 Nonenumpy.ndarray 或 None

集合中每个元素要设置的大小。该值是元素的'面积'。

dpifloat, 默认值: 72

画布的 dpi。

set_sort_zpos(val)[源代码][源代码]#

设置用于z排序的位置。