mpl_toolkits.mplot3d.art3d.Line3DCollection

class mpl_toolkits.mplot3d.art3d.Line3DCollection(segments, linewidths=None, colors=None, antialiaseds=None, linestyles='solid', offsets=None, transOffset=None, norm=None, cmap=None, pickradius=5, zorder=2, facecolors='none', **kwargs) [source]

Bases: matplotlib.collections.LineCollection

A collection of 3D lines.

Parameters:
segments: list of array-like

A sequence of (line0, line1, line2), where:

linen = (x0, y0), (x1, y1), ... (xm, ym)

or the equivalent numpy array with two columns. Each line can have a different number of segments.

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, not allowed).

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

Whether to use antialiasing for each line.

zorderint, default: 2

zorder of the lines once drawn.

facecolorscolor or list of color, default: 'none'

The facecolors of the LineCollection. Setting to a value other than 'none' will lead to each line being "filled in" as if there was an implicit line segment joining the last and first points of that line back around to each other. In order to manually specify what should count as the "interior" of each line, please use PathCollection instead, where the "interior" can be specified by appropriate usage of CLOSEPOLY.

**kwargs

Forwareded to Collection.

__module__ = 'mpl_toolkits.mplot3d.art3d'
do_3d_projection(self, renderer) [source]

Project the points according to renderer matrix.

draw(self, renderer, project=False) [source]

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

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

Parameters:
rendererRendererBase subclass.

Notes

This method is overridden in the Artist subclasses.

set_segments(self, segments) [source]

Set 3D segments.

set_sort_zpos(self, val) [source]

Set the position to use for z-sorting.

Examples using mpl_toolkits.mplot3d.art3d.Line3DCollection

© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.3.3/api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection.html