
386 A Computational Introduction to Digital Image Processing, Second Edition
Octave
>> colormap(’list’)
ns =
{
[1,1] = autumn
[1,2] = bone
[1,3] = cool
[1,4] = copper
[1,5] = flag
[1,6] = gmap40
[1,7] = gray
[1,8] = hot
[1,9] = hsv
[1,10] = jet
[1,11] = lines
[1,12] = ocean
[1,13] = pink
[1,14] = prism
[1,15] = rainbow
[1,16] = spring
[1,17] = summer
[1,18] = white
[1,19] = winter
}
In Python, the colormaps are given as dictionaries stored as datad in the cm module of
matplotlib.pyplot:
Python
In : import matplotlib.pyplot as plt
In : plt.cm.datad.viewkeys()
Out: dict
_
keys([’Spectral’, ’summer’, ’coolwarm’, ’pink
_
r’, ’Set1’, ’Set2’
, ’Set3’,
’brg
_
r’, ’Dark2’, ’hot’, ’PuOr ...