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

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 be a different length.

colorssequence, optional

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

antialiasedssequence, optional

A sequence of ones or zeros.

linestylesstr or tuple, optional

Either one of {'solid', 'dashed', 'dashdot', 'dotted'}, or a dash tuple. The dash tuple is:

(offset, onoffseq)

where onoffseq is an even length tuple of on and off ink in points.

normNormalize, optional

Normalize instance.

cmapstr or Colormap, optional

Colormap name or Colormap instance.

pickradiusfloat, optional

The tolerance in points for mouse clicks picking a line. Default is 5 pt.

zorderint, optional

zorder of the LineCollection. Default is 2.

facecolorsoptional

The facecolors of the LineCollection. Default is 'none'. Setting to a value other than 'none' will lead to a filled polygon being drawn between points on each line.

Notes

If linewidths, colors, or antialiaseds is None, they default to their rcParams setting, in sequence form.

If offsets and transOffset are not None, then offsets are transformed by transOffset and applied after the segments have been transformed to display coordinates.

If offsets is not None but transOffset is None, then the offsets are added to the segments before any transformation. In this case, a single offset can be specified as:

offsets=(xo, yo)

and this value will be added cumulatively to each successive segment, so as to produce a set of successively offset curves.

The use of ScalarMappable is optional. If the ScalarMappable array _A is not None (i.e., a call to set_array() has been made), at draw time a call to scalar mappable will be made to set the colors.

do_3d_projection(self, renderer) [source]

Project the points according to renderer matrix.

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

Draw the Artist using the given renderer.

This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible (Artist.get_visible is False).

Parameters:
rendererRendererBase subclass.
set_segments(self, segments) [source]

Set 3D segments.

set_sort_zpos(self, val) [source]

Set the position to use for z-sorting.

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