mpl_toolkits.mplot3d.art3d.PathPatch3D#

class mpl_toolkits.mplot3d.art3d.PathPatch3D(path, *, zs=(), zdir='z', axlim_clip=False, **kwargs)[source]#

基类: Patch3D

3D 路径补丁对象。

参数:
路径
zs浮点数

在 3D 空间中沿 zdir 轴放置路径补丁的位置。

zdir{'x', 'y', 'z', 3-元组}

用于绘制垂直于该平面的路径补丁的平面。默认值: 'z'。请参阅 get_dir_vector 以获取值的描述。

axlim_clip布尔值, 默认值: False

是否隐藏轴视图限制之外的路径补丁。

do_3d_projection()[source]#
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, hatch_linewidth=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, mouseover=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]#

一次性设置多个属性。

支持的属性包括:

属性

描述

3d_properties

未知

agg_filter

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

alpha

浮点数或 None

animated

布尔值

antialiasedaa

布尔值或 None

capstyle

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

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

color

color

edgecolorec

颜色 或 None

facecolorfc

颜色 或 None

figure

FigureSubFigure

fill

布尔值

gid

str

hatch

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

hatch_linewidth

未知

in_layout

布尔值

joinstyle

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

label

object

linestylels

{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}

linewidthlw

浮点数或 None

mouseover

布尔值

path_effects

AbstractPathEffect 列表

picker

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

rasterized

布尔值

sketch_params

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

snap

布尔值或 None

transform

变换

url

str

visible

布尔值

zorder

浮点数

set_3d_properties(path, zs=0, zdir='z', axlim_clip=False)[source]#

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

参数:
路径
zs浮点数

在 3D 空间中沿 zdir 轴放置路径补丁的位置。

zdir{'x', 'y', 'z', 3-元组}

用于绘制垂直于该平面的路径补丁的平面。默认值: 'z'。请参阅 get_dir_vector 以获取值的描述。

axlim_clip布尔值, 默认值: False

是否隐藏轴视图限制之外的路径补丁。

使用 mpl_toolkits.mplot3d.art3d.PathPatch3D 的示例#

在三维图中绘制平面对象

在三维图中绘制平面对象