title: Python matplotlib scatter plot : changing colour of data points based on given conditions
body: <p>I have the following data (four equal-length arrays) :</p>
  
  <pre><code>a = [1, 4, 5, 2, 8, 9, 4, 6, 1, 0, 6]
  b = [4, 7, 8, 3, 0, 9, 6, 2, 3, 6, 7]
  c = [9, 0, 7, 6, 5, 6, 3, 4, 1, 2, 2]
  d = [La, Lb, Av, Ac, Av, By, Lh, By, Lg, Ac, Bt]
  </code></pre>
  
  <p>I am making a 3d plot of arrays a, b, c :</p>
  
  <pre><code>import pylab
  import matplotlib.pyplot as plt
  
  fig = plt.figure()
  ax = fig.add_subplot(111, projection='3d')
  ax.scatter(a,b,c)
  
  plt.show()
  </code></pre>
  
  <p>Now, <strong>I want to color these scattered points using the array named 'd'</strong> such that; if the first letter of corresponding 'i'th element value in d is 'L', then colour the point red, if it starts with 'A' colour it green and if it starts with 'B', colour it blue.</p>
  
  <p>So, first point (1,4,9) should be red, second(4,7,0) red too, third(5,8,7) should be green and so on..</p>
  
  <p>Is it possible to do so? Please help if you have some idea :)</p>