Bases: PolyCollection
A collection of 3D polygons.
Note
Filling of 3D polygons
There is no simple definition of the enclosed surface of a 3D polygon unless the polygon is planar.
In practice, Matplotlib fills the 2D projection of the polygon. This gives a correct filling appearance only for planar polygons. For all other polygons, you'll find orientations in which the edges of the polygon intersect in the projection. This will lead to an incorrect visualization of the 3D area.
If you need filled areas, it is recommended to create them via plot_trisurf, which creates a triangulation and thus generates consistent surfaces.
The sequence of polygons [verts0, verts1, ...] where each element verts_i defines the vertices of polygon i as a 2D array-like of shape (N, 3).
The calculation method for the z-order. See set_zsort for details.
Whether to shade facecolors and edgecolors. When activating shade, facecolors and/or edgecolors must be provided.
Added in version 3.7.
LightSource, optional
The lightsource to use when shade is True.
Added in version 3.7.
All other parameters are forwarded to PolyCollection.
Note that this class does a bit of magic with the _facecolors and _edgecolors properties.
Perform the 3D projection for this object.
Optimize points for projection.
Set multiple properties at once.
Supported properties are
Property | Description |
|---|---|
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 | |
unknown | |
bool | |
| bool or list of bools |
array-like or None | |
| |
(vmin: float, vmax: float) | |
| |
bool | |
Patch or (Path, Transform) or None | |
| |
color or list of RGBA tuples | |
| unknown |
| unknown |
str | |
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} | |
bool | |
| |
object | |
| str or tuple or list thereof |
| float or list of floats |
bool | |
| |
| |
(N, 2) or (2,) array-like | |
list of | |
list of array-like | |
None or bool or float or callable | |
float | |
bool | |
|
|
(scale: float, length: float, randomness: float) | |
bool or None | |
unknown | |
str | |
list of str or None | |
list of (N, 3) array-like | |
unknown | |
bool | |
float | |
{'average', 'min', 'max'} |
Set the alpha value used for blending - not supported on all backends.
All values must be within the 0-1 range, inclusive. Masked values and nans are not supported.
Set the edgecolor(s) of the collection.
Set the facecolor(s) of the collection. c can be a color (all patches have same color), or a sequence of colors; if it is a sequence the patches will cycle through the sequence.
If c is 'none', the patch will not be filled.
Set the position to use for z-sorting.
Set 3D vertices.
The sequence of polygons [verts0, verts1, ...] where each element verts_i defines the vertices of polygon i as a 2D array-like of shape (N, 3).
Whether the polygon should be closed by adding a CLOSEPOLY connection at the end.
Set 3D vertices with path codes.
Set the calculation method for the z-order.
The function applied on the z-coordinates of the vertices in the viewer's coordinate system, to determine the z-order.
mpl_toolkits.mplot3d.art3d.Poly3DCollection
© 2012–2023 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/stable/api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection.html