@@ -530,17 +530,39 @@ def patch_collection_2d_to_3d(col, zs=0, zdir='z', depthshade=True):
530
530
class Poly3DCollection (PolyCollection ):
531
531
"""
532
532
A collection of 3D polygons.
533
+
534
+ .. note::
535
+ **Filling of 3D polygons**
536
+
537
+ There is no simple definition of the enclosed surface of a 3D polygon
538
+ unless the polygon is planar.
539
+
540
+ In practice, Matplotlib performs the filling on the 2D projection of
541
+ the polygon. This gives a correct filling appearance only for planar
542
+ polygons. For all other polygons, you'll find orientations in which
543
+ the edges of the polygon intersect in the projection. This will lead
544
+ to an incorrect visualization of the 3D area.
545
+
546
+ If you need filled areas, it is recommended to create them via
547
+ `.plot_trisurf`, which creates a triangulation and thus generates
548
+ consistent surfaces.
533
549
"""
534
550
535
551
def __init__ (self , verts , * args , zsort = 'average' , ** kwargs ):
536
552
"""
537
- Create a Poly3DCollection.
538
-
539
- *verts* should contain 3D coordinates.
540
-
541
- Keyword arguments:
542
- zsort, see set_zsort for options.
553
+ Parameters
554
+ ----------
555
+ verts : list of array-like Nx3
556
+ Each element describes a polygon as a sequnce of ``N_i`` points
557
+ ``(x, y, z)``.
558
+ zsort : {'average', 'min', 'max'}, default: 'average'
559
+ The calculation method for the z-order.
560
+ See `~.Poly3DCollection.set_zsort` for details.
561
+ *args, **kwargs
562
+ All other parameters are forwarded to `.PolyCollection`.
543
563
564
+ Notes
565
+ -----
544
566
Note that this class does a bit of magic with the _facecolors
545
567
and _edgecolors properties.
546
568
"""
0 commit comments