mpl_toolkits.mplot3d.art3d.Poly3DCollection

class mpl_toolkits.mplot3d.art3d.Poly3DCollection(verts, *args, zsort='average', **kwargs) [source]

Bases: matplotlib.collections.PolyCollection

A collection of 3D polygons.

Create a Poly3DCollection.

verts should contain 3D coordinates.

Keyword arguments: zsort, see set_zsort for options.

Note that this class does a bit of magic with the _facecolors and _edgecolors properties.

do_3d_projection(self, renderer) [source]

Perform the 3D projection for this object.

get_edgecolor(self) [source]
get_facecolor(self) [source]
get_vector(self, segments3d) [source]

Optimize points for projection.

set_3d_properties(self) [source]
set_alpha(self, alpha) [source]

Set the alpha transparencies of the collection.

Parameters:
alpha : float or None
set_edgecolor(self, colors) [source]

Set the edgecolor(s) of the collection.

Parameters:
c : color or sequence of colors or 'face'

The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor.

set_facecolor(self, colors) [source]

Set the facecolor(s) of the collection. c can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence.

If c is 'none', the patch will not be filled.

Parameters:
c : color or sequence of colors
set_sort_zpos(self, val) [source]

Set the position to use for z-sorting.

set_verts(self, verts, closed=True) [source]

Set 3D vertices.

set_verts_and_codes(self, verts, codes) [source]

Sets 3D vertices with path codes.

set_zsort(self, zsort) [source]

Sets the calculation method for the z-order.

Parameters:
zsort : {'average', 'min', 'max'}

The function applied on the z-coordinates of the vertices in the viewer's coordinate system, to determine the z-order. True is deprecated and equivalent to 'average'.

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