title: How can I use a pre-made color map for my heat map in matplotlib?
body: <p>I want to use a color map from <a href="http://goo.gl/5P4CT" rel="noreferrer">http://goo.gl/5P4CT</a> for my matplotlib heat map.</p>
  
  <p>I tried doing this:</p>
  
  <pre><code>myHeatMap.imshow(heatMap, extent=ext, cmap=get_cmap(cm.datad["Spectral"]))
  </code></pre>
  
  <p>However, the Python interpreter complains</p>
  
  <pre><code>in get_cmap
  if name in cmap_d:
      TypeError: unhashable type: 'dict'
  </code></pre>
  
  <p>What is the proper way to use one of these color maps?</p>