%% Plot a Custom Colormap
%
% Create a custom colormap and plot it. Then display a colorbar as a visual reference.

r = (0:.1:.9)';
g = r.^1.8;
b = r.^2.1;
mymap = [r g b]; 
rgbplot(mymap)
hold on
colormap(mymap)
colorbar('Ticks',[])

%
% Copyright 2012 The MathWorks, Inc.