I want to use a color map from http://goo.gl/5P4CT for my matplotlib heat map.
I tried doing this:
myHeatMap.imshow(heatMap, extent=ext, cmap=get_cmap(cm.datad["Spectral"]))
However, the Python interpreter complains
in get_cmap
if name in cmap_d:
TypeError: unhashable type: 'dict'
What is the proper way to use one of these color maps?
It looks like you are simply calling
get_cmapwrong. Try:What are the named colormaps?
Running the code:
Gives a list of colormaps, any of which can be substituted for
"Spectral":