title: How to create colour map from 3 arrays in python
body: <p>I'm trying to create a colour plot in python of two arrays t1 and t2 with the colours being set by a third one v, but I can't get the colour bar to be in terms of the v array, it is instead in terms of t1. This is my code:</p>
  
  <pre><code>    import matplotlib.pyplot as plt
      import numpy as np
      t1 = [75, 76, 77, 78]
      t2 = [75, 76, 77, 78]
      v = [0.5, 0.5, 0.8, 0.8]
  
      image_data = np.column_stack([t1, t2, v])
      plt.imshow(image_data)
      plt.colorbar()
      plt.show()
  </code></pre>
  
  <p>It produces this figure:
  <a href="https://i.stack.imgur.com/FPfuh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FPfuh.png" alt="Colour map with incorrect colour bar"></a></p>
  
  <p>Any help would be much appreciated.</p>