Question
I am a physicist with data that consists of 4 numpy.ndarrays, with equal lengths (the data I have is huge, with len ~75k). I am looking for a way to sort and plot data from the arrays.
Let's say I have arrays similar to A,B,C,D below:
A = [1,2,3,1,2,3,1,2,3,1,2,3]
B = [1,1,1,2,2,2,1,1,1,2,2]
C = [1,1,1,1,1,1,2,2,2,2,2]
D = [5,6,3,6,3,5,2,4,6,8,7,9]
Let's now say I would like to do a 3D plot of A,D,B' for each value ofC`. How could I automate this?
Chosen solution
With lots of help from RickardSjogren I wrote the following code to plot and save each of the data series for each value of C.
fig = plt.figure()
C_unique = np.unique(C)
for c in zip(C_unique):
ax = axes(projection='3d')
ax.scatter(A[C == c], D[C == c], B[C == c])
ax.set_xlabel('A')
ax.set_ylabel('D')
ax.set_zlabel('B')
ax.set_title('C = '+str(c))
savefig(saveDirectory+'/'+str(c))
clf()

3D plot of A,D,B' for each value ofC?A,D,Bas ax,y,z3D projection plot, for each value ofC. In the case of the arrays shown there, that would mean plot 2 plots ofA,D,B, one whereC=1, another whereC=2.