title: Colorbar associate with numbers in an array
body: <p>I have an array of 155 numbers ranging from 0 to 3. I am wanting have each number correspond to a different colour. So 0-red, 1-blue, 2-green and 3-yellow, then plot the array onto the colorbar</p>
  
  <pre><code>origin = 'lower'
  #origin = 'upper'
  
  delta = 0.025
  
  x = y = np.arange(-3.0, 3.01, delta)
  X, Y = np.meshgrid(x, y)
  Z1 = plt.mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
  Z2 = plt.mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
  Z = 10 * (Z1 - Z2)
  levels = salist ##array of 155
  CS3 = plt.contourf(X, Y, Z, levels,
                      colors = ('r', 'g', 'b','y'),
                      origin=origin,
                      extend='both')
  
  plt.colorbar(CS3)
  </code></pre>