title: Python color map but with all zero values mapped to black
body: <p>I have a square array of elements which correspond to lattice sites. Some of the elements are zero and the rest vary between 1 and about 2700. Using imshow and the OrRd colour map, I want all lattice sites greater than 0 to display the corresponding colour but importantly, <em>all sites with value 0 to be displayed as black</em>. I have tried defining a new color map as follows:</p>
  
  <pre><code>colors = [(0,0,0)] + [(pylab.cm.OrRd(i)) for i in range(1,256)] 
  new_map = matplotlib.colors.LinearSegmentedColormap.from_list('new_map', colors, N=256)
  </code></pre>
  
  <p>but the range of values in my array is too large and so a lot of non-zero values get displayed as black.</p>
  
  <p>Many thanks.</p>