I want to plot data from a column and change the colour depending on the corresponding value in another column. I can do it by looping through each row as:
for a in range(0, len(ben_chan)-1):
if ben_chan[a, int(ben_chan.shape[1])-1] == 0:
plot1=plt.plot(ben_chan[:,0],ben_chan[:,channel], ".r")
else:
plot2=plt.plot(ben_chan[:,0],ben_chan[:,channel], ".b")
Is there a more efficient way of implementing this?