title: python how to plot classification data
body: <p>I'm unable to plot the data for classification algo using numpy as it throws this error <code>ValueError: x and y must be the same size</code></p>
  
  <p>My data in the <code>data</code> variable look like this:</p>
  
  <pre><code>[[ 34.62365962  78.02469282   0.        ]
   [ 30.28671077  43.89499752   0.        ]
   [ 35.84740877  72.90219803   0.        ]
   [ 60.18259939  86.3085521    1.        ]
   [ 79.03273605  75.34437644   1.        ]
   [ 45.08327748  56.31637178   0.        ]
   [ 61.10666454  96.51142588   1.        ]
   [ 75.02474557  46.55401354   1.        ]]
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>data=np.loadtxt('ex2data1.txt',delimiter=',',dtype=None)
  X = data[:, [0,1]]
  y = data[:, 2]
  pylab.scatter(X,y)
  pylab.show()
  </code></pre>
  
  <p>I'm trying to plot this:</p>
  
  <p><a href="https://i.stack.imgur.com/PvECs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PvECs.png" alt="enter image description here"></a></p>