title: How to create a scatter plot for two data classes with pyplot?
body: <p>I have two sets of data, <code>x</code> and <code>y</code> as ints.  I need to plot both of these data points using <code>matplotlib.pyplot.scatter</code>.  I also need to plot the first category <code>y == 0</code> in one color and the second, <code>y == 1</code> in a different color.</p>
  <p>I've looked at the documentation for the scatter function, but I don't understand how to do all of this in one plot.</p>
  <p>Sample data:</p>
  <pre><code>2.897534798034255,0.872359037956732,1
  1.234850239781278,-0.293047584301112,1
  0.238575209753427,0.129572680572429,0
  -0.109757648021958,0.484048547480385,1
  1.109735783200013,-0.002785328902198,0
  1.572803975652908,0.098547849368397,0
  </code></pre>
  <p>x and y are defined as:</p>
  <pre><code>x = data[:, [0, 1]]
  y = data[:, -1].astype(int)
  </code></pre>
  <p>Size of x is 2000, size of y is 1000</p>
  <p>My attempt:</p>
  <pre><code>pl.scatter(x, y==0, s=3, c='r')
  pl.scatter(x, y==1, s=3, c='b')
  pl.show()
  </code></pre>