title: Scatter plot with logical indexing
body: <p>I have a 100x2 array D and a 100x1 array c (with entries +/- 1) I'm trying to make a scatter plot of the columns in D corresponding to c = 1. </p>
  
  <p>I tried something like this: <code>plt.scatter(D[0][c==1],D[1][c==1])</code> but it throws up <code>IndexError: too many indices for array</code></p>
  
  <p>I'm aware that I've use list comprehension or something of that sort. I'm fairly new to Python and hence struggling with the format. </p>
  
  <p>Thanks a lot. </p>