I am struggling to get the following code to work in Python 3.
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import matplotlib.pyplot as plt
fig = plt.figure()
ax = Axes3D(fig)
x = [0,1,1,0]
y = [0,0,1,1]
z = [0,1,0,1]
#verts = [zip(x, y,z)]
verts = list(zip(x, y, z))
ax.add_collection3d(Poly3DCollection(verts))
plt.show()
The next to last line gives the following error:
TypeError: zip argument #1 must support iteration
How do I fix this?