mpl_toolkits.mplot3d.art3d.PathPatch3D#

class mpl_toolkits.mplot3d.art3d.PathPatch3D(path, *, zs=(), zdir='z', **kwargs)[源代码][源代码]#

基类:Patch3D

3D PathPatch 对象。

参数:
路径
zs浮动

在三维空间中沿 zdir 轴定位路径补丁的位置。

zdir{'x', 'y', 'z', 3-tuple}

要绘制路径补丁的平面。默认值:'z'。有关值的描述,请参见 get_dir_vector

do_3d_projection()[源代码][源代码]#
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>, 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>)[源代码]#

一次设置多个属性。

支持的属性有

属性

描述

3d_properties

未知

agg_filter

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

alpha

标量或无

animated

布尔

抗锯齿 或 aa

布尔值或无

capstyle

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

clip_box

BboxBase 或 None

clip_on

布尔

clip_path

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

颜色

color

edgecolor 或 ec

color or None

facecolor 或 fc

color or None

figure

FigureSubFigure

fill

布尔

gid

str

hatch

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

in_layout

布尔

joinstyle

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

标签

对象

线型 或 ls

{'-', '--', '-.', ':', '', (偏移, 开关序列), ...}

linewidth 或 lw

浮点数或无

鼠标悬停

布尔

path_effects

AbstractPathEffect 的列表

picker

None 或 bool 或 float 或 callable

光栅化

布尔

sketch_params

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

snap

布尔值或无

transform

Transform

url

str

可见

布尔

zorder

浮动

set_3d_properties(path, zs=0, zdir='z')[源代码][源代码]#

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

参数:
路径
zs浮动

在三维空间中沿 zdir 轴定位路径补丁的位置。

zdir{'x', 'y', 'z', 3-tuple}

要绘制路径补丁的平面。默认值:'z'。有关值的描述,请参见 get_dir_vector

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

在3D图中绘制平面物体

Draw flat objects in 3D plot