This is a bug with the explicit PolyCollection close function.
For now, turn this off, and you will get what I think is the result you expect:
poly = PolyCollection(verts, facecolors = [cc('r'), cc('g'), cc('b'), cc('y')], closed=False)
The only problem is that you should not get the expected results while doing this, because the polygon should not close. This is another related error with the 3D code. In any case, this only affects the line around the edge, and in your example it hardly matters (at first I thought it was correctly closed until I increased the line width).
PolyCollection uses path.Path objects to store vertices, and for closed polygons, the CLOSEPOLY vertex code is used, which purely closes the path (does not overlap in the line).
The 3D projection code for PolyCollections seems more like a hack that takes your PolyCollection, extracts the paths, takes vertices from these paths, throwing codes for those vertices and assuming that they are all real vertex coordinates, and then directly modify the vertices on the original PolyCollection to use new paths that have a 2D screen, projected coordinates without codes ... and regardless of your settings, are closed.
I registered this as question # 2045 .
cge
source share