mpl_toolkits.mplot3d.art3d.Patch3DCollection#

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

基类:PatchCollection

一组3D补丁。

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

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

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

do_3d_projection()[源代码][源代码]#
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>, 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: 浮点数, vmax: 浮点数)

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 或其列表

线宽 或 linewidths 或 lw

浮点数或浮点数列表

鼠标悬停

布尔

norm

Normalize 或 str 或 None

offset_transform 或 transOffset

Transform

偏移量

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

path_effects

AbstractPathEffect 的列表

路径

未知

选择器

None 或 bool 或 float 或 callable

pickradius

浮动

光栅化

布尔

sketch_params

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

snap

布尔值或无

sort_zpos

未知

transform

Transform

url

str

urls

list of str 或 None

可见

布尔

zorder

浮动

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

设置补丁的 z 位置和方向。

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

zdir 轴上,补丁在集合中的位置或位置。

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

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

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

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

参数:
depthshade布尔

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

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

设置用于z排序的位置。