% MAKECOLORMAP makes smoothly varying colormaps a = makeColorMap(beginColor, middleColor, endColor, numSteps); a = makeColorMap(beginColor, endColor, numSteps); a = makeColorMap(beginColor, middleColor, endColor); a = makeColorMap(beginColor, endColor); all colors are specified as RGB triples numSteps is a scalar saying howmany points are in the colormap Examples: peaks; a = makeColorMap([1 0 0],[1 1 1],[0 0 1],40); colormap(a) colorbar peaks; a = makeColorMap([1 0 0],[0 0 1],40); colormap(a) colorbar peaks; a = makeColorMap([1 0 0],[1 1 1],[0 0 1]); colormap(a) colorbar peaks; a = makeColorMap([1 0 0],[0 0 1]); colormap(a) colorbar Reference: A. Light & P.J. Bartlein, "The End of the Rainbow? Color Schemes for Improved Data Graphics," Eos,Vol. 85, No. 40, 5 October 2004. http://geography.uoregon.edu/datagraphics/EOS/Light&Bartlein_EOS2004.pdf