mpl_toolkits.mplot3d.art3d.Path3DCollection#

classmpl_toolkits.mplot3d.art3d.Path3DCollection(*args,zs=0,zdir='z',depthshade=None,depthshade_minalpha=None,axlim_clip=False,**kwargs)[source]#

Bases:PathCollection

A collection of 3D paths.

Create a collection of flat 3D paths with its normal vectorpointed inzdir direction, and located atzs on thezdiraxis. 'zs' can be a scalar or an array-like of the same length asthe number of paths in the collection.

Constructor arguments are the same as forPathCollection. In addition,keywordszs=0 andzdir='z' are available.

Also, the keyword argumentdepthshade is available toindicate whether or not to shade the patches in order togive the appearance of depth (default isTrue).This is typically desired in scatter plots.

depthshade_minalpha sets the minimum alpha value applied bydepth-shading.

do_3d_projection()[source]#
draw(renderer)[source]#

Draw the Artist (and its children) using the given renderer.

This has no effect if the artist is not visible (Artist.get_visiblereturns False).

Parameters:
rendererRendererBase subclass.

Notes

This method is overridden in the Artist subclasses.

get_depthshade()[source]#
get_edgecolor()[source]#
get_facecolor()[source]#
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>,hatch_linewidth=<UNSET>,hatchcolor=<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>)[source]#

Set multiple properties at once.

Supported properties are

Property

Description

3d_properties

float or array of floats

agg_filter

a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image

alpha

array-like or float or None

animated

bool

antialiased oraa orantialiaseds

bool or list of bools

array

array-like or None

capstyle

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

clim

(vmin: float, vmax: float)

clip_box

BboxBase or None

clip_on

bool

clip_path

Patch or (Path, Transform) or None

cmap

Colormap or str or None

color

color or list of RGBA tuples

depthshade

bool

edgecolor orec oredgecolors

color or list ofcolor or 'face'

facecolor orfacecolors orfc

color or list ofcolor

figure

Figure orSubFigure

gid

str

hatch

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

hatch_linewidth

unknown

hatchcolor

color or list ofcolor or 'edge'

in_layout

bool

joinstyle

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

label

object

linestyle ordashes orlinestyles orls

str or tuple or list thereof

linewidth orlinewidths orlw

unknown

mouseover

bool

norm

Normalize or str or None

offset_transform ortransOffset

Transform

offsets

(N, 2) or (2,) array-like

path_effects

list ofAbstractPathEffect

paths

unknown

picker

None or bool or float or callable

pickradius

float

rasterized

bool

sizes

unknown

sketch_params

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

snap

bool or None

sort_zpos

unknown

transform

Transform

url

str

urls

list of str or None

visible

bool

zorder

float

set_3d_properties(zs,zdir,axlim_clip=False)[source]#

Set thez positions and direction of the paths.

Parameters:
zsfloat or array of floats

The location or locations to place the paths in the collectionalong thezdir axis.

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

Plane to plot paths orthogonal to.All paths must have the same direction.Seeget_dir_vector for a description of the values.

axlim_clipbool, default: False

Whether to hide paths with a vertex outside the axes view limits.

Added in version 3.10.

set_depthshade(depthshade,depthshade_minalpha=None)[source]#

Set whether depth shading is performed on collection members.

Parameters:
depthshadebool

Whether to shade the patches in order to give the appearance ofdepth.

depthshade_minalphafloat

Sets the minimum alpha value used by depth-shading.

Added in version 3.11.

set_linewidth(lw)[source]#

Set the linewidth(s) for the collection.lw can be a scalaror a sequence; if it is a sequence the patches will cyclethrough the sequence

Parameters:
lwfloat or list of floats
set_sizes(sizes,dpi=72.0)[source]#

Set the sizes of each member of the collection.

Parameters:
sizesnumpy.ndarray or None

The size to set for each element of the collection. Thevalue is the 'area' of the element.

dpifloat, default: 72

The dpi of the canvas.

set_sort_zpos(val)[source]#

Set the position to use for z-sorting.