I would like to plot say 10 lines in 3D in matplotlib, but without having to use ax.plot(x,y,z) 10 times. This is the ridiculous code I've come up with b/c I can't envision how the zip and arrays actually work together.
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
x = np.array([0.,3.])
y = np.array([0.,0.])
z = np.array([0.,0.])
u = np.array([0.,3.])
v = np.array([.5,.5])
w = np.array([0.,0.])
a = np.array([0.,3.])
b = np.array([1.,1.])
c = np.array([0.,0.])
e = np.array([0.,3.])
d = np.array([1.5,1.5])
f = np.array([0.,0.])
r = np.array([0.,3.])
s = np.array([2.,2.])
t = np.array([0.,0.])
ax.set_xlabel("x axis")
ax.set_ylabel("y axis")
ax.set_zlabel("z axis")
ax.plot(x,y,z)
ax.plot(a,b,c)
ax.plot(r,s,t)
ax.plot(u,v,w)
ax.plot(e,d,f)
plt.show()
I'm guessing I'll use zip and/or a for loop.
Thanks, and here's the figure.