Home > Applications > SpinW > external > makecolormap.m

iFit/makecolormap

PURPOSE ^

% MAKECOLORMAP makes smoothly varying colormaps

SYNOPSIS ^

function cMap = makecolormap(varargin)

DESCRIPTION ^

% 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Tue 27-Nov-2018 10:56:24 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1