mpl_toolkits.mplot3d.art3d.Line3DCollection#

classmpl_toolkits.mplot3d.art3d.Line3DCollection(lines,axlim_clip=False,**kwargs)[source]#

Bases:LineCollection

A collection of 3D lines.

Parameters:
segmentslist of (N, 2) array-like

A sequence[line0,line1,...] where each line is a (N, 2)-shapearray-like containing points:

line0=[(x0,y0),(x1,y1),...]

Each line can contain a different number of points.

linewidthsfloat or list of float, default:rcParams["lines.linewidth"] (default:1.5)

The width of each line in points.

colorscolor or list of color, default:rcParams["lines.color"] (default:'C0')

A sequence of RGBA tuples (e.g., arbitrary color strings, etc, notallowed).

antialiasedsbool or list of bool, default:rcParams["lines.antialiased"] (default:True)

Whether to use antialiasing for each line.

zorderfloat, default: 2

zorder of the lines once drawn.

facecolorscolor or list ofcolor, default: 'none'

When settingfacecolors, each line is interpreted as a boundaryfor an area, implicitly closing the path from the last point to thefirst point. The enclosed area is filled withfacecolor.In order to manually specify what should count as the "interior" ofeach line, please usePathCollection instead, where the"interior" can be specified by appropriate usage ofCLOSEPOLY.

**kwargs

Forwarded toCollection.

do_3d_projection()[source]#

Project the points according to renderer matrix.

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>,colors=<UNSET>,edgecolor=<UNSET>,facecolor=<UNSET>,gapcolor=<UNSET>,gid=<UNSET>,hatch=<UNSET>,hatch_linewidth=<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>,segments=<UNSET>,sketch_params=<UNSET>,snap=<UNSET>,sort_zpos=<UNSET>,transform=<UNSET>,url=<UNSET>,urls=<UNSET>,verts=<UNSET>,visible=<UNSET>,zorder=<UNSET>)[source]#

Set multiple properties at once.

Supported properties are

Property

Description

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 ofcolor

colors

color or list ofcolor

edgecolor orec oredgecolors

color or list ofcolor or 'face'

facecolor orfacecolors orfc

color or list ofcolor

figure

Figure orSubFigure

gapcolor

color or list ofcolor or None

gid

str

hatch

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

hatch_linewidth

unknown

in_layout

bool

joinstyle

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

label

object

linestyle ordashes orlinestyles orls

str or tuple or list thereof

linewidth orlinewidths orlw

float or list of floats

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

segments

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

verts

unknown

visible

bool

zorder

float

set_segments(segments)[source]#

Set 3D segments.

set_sort_zpos(val)[source]#

Set the position to use for z-sorting.

Examples usingmpl_toolkits.mplot3d.art3d.Line3DCollection#

3D stem

3D stem