title: Change color of matplotlib.pyplot points
body: <p>Here is plot code I've written : </p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  Y = [ 1 , 2 , 3 ]
  X = [ 1 , 2 , 4 ]
  vocabulary = [1 , 2 , 3]
  
  plt.scatter(X , Y)
  for label, x, y in zip(vocabulary, X, Y):
      if(label == 1):
          plt.annotate('', xy=(x, y), xytext=(0, 0), color='red' , textcoords='offset points')
      elif(label == 1):
          plt.annotate('', xy=(x, y), xytext=(0, 0), color='green' , textcoords='offset points')
      elif(label == 1):
          plt.annotate('', xy=(x, y), xytext=(0, 0), color='blue' , textcoords='offset points')
      else :
          plt.annotate('', xy=(x, y), xytext=(0, 0), color='black' , textcoords='offset points')
  plt.show()
  </code></pre>
  
  <p>I'm attempting to change the color depending on the value in array <code>vocabulary</code>
  if 1 then color the data point red , if 2 then green , if 3 then blue else color the point black. But for all points the color of each point is set to blue. How to color the data point depending on the current value of <code>vocabulary</code> ?</p>
  
  <p>Above code produces : </p>
  
  <p><a href="https://i.stack.imgur.com/Lm8kh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lm8kh.png" alt="enter image description here"></a></p>