Closed
Description
Drawing 3D polygon with the code:
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
ax.set_xlim((0, 5))
ax.set_ylim((0, 5))
ax.set_zlim((0, 5))
x = [1,2,3, 3,2,1]
y = [2,1,2, 2,1,2]
z = [1,1,1, 2,2,2]
v = [list(zip(x, y, z))]
pc = Poly3DCollection(v)
ax.add_collection3d(pc)
Leads to the following result on scene rotation:
While the polygon should looks like this:
Matplotlib version
- Operating system: Ubuntu 16.04.6 LTS
- Matplotlib version: 3.1.2
- Matplotlib backend (
print(matplotlib.get_backend())
): module://ipympl.backend_nbagg - Python version: 3.8.1
- Jupyter version (if applicable): 1.0.0
- Other libraries: