title: Map values to colors in matplotlib
body: <p>I have a list of numbers as follows:</p>
  
  <pre><code>lst = [1.9378076554115014, 1.2084586588892861, 1.2133096565896173, 
         1.2427632053442292, 1.1809971732733273, 0.91960143581348919, 
         1.1106310149587162, 1.1106310149587162, 1.1527004351293346, 
         0.87318084435885079, 1.1666132876686799, 1.1666132876686799]
  </code></pre>
  
  <p>I want to convert these numbers to colors for display.
  I want gray scale but when I am using these numbers as it is, it gives me an error:</p>
  
  <pre><code>ValueError: to_rgba: Invalid rgba arg "1.35252299785"
  to_rgb: Invalid rgb arg "1.35252299785"
  gray (string) must be in range 0-1 
  </code></pre>
  
  <p>...which I understand is due to it exceeding 1.</p>
  
  <p>I next tried to divide the items in the list with the highest number in the list to give values less than 1. But this gives a very narrow color scale with hardly any difference between values.</p>
  
  <p>Is there any way in which I can give some min and max range to colors and convert these values to color? I am using matplotlib.</p>