Home > atmlab > graphs > drywet.m

drywet

PURPOSE ^

colourmap with deserty colours for low and blueish colours for high

SYNOPSIS ^

function cmap = drywet(varargin)

DESCRIPTION ^

 colourmap with deserty colours for low and blueish colours for high

 IN

   width   Relative width of the white region compared to the other
           colours.  In the range (0, 1) where limit 0 means no white at
           all and limit 1 means the colourmap is dominated by bright colours.
           Defaults to 0.5.

 See also: zerobright

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

drywet.m

SOURCE CODE ^

0001 function cmap = drywet(varargin)
0002 
0003 % colourmap with deserty colours for low and blueish colours for high
0004 %
0005 % IN
0006 %
0007 %   width   Relative width of the white region compared to the other
0008 %           colours.  In the range (0, 1) where limit 0 means no white at
0009 %           all and limit 1 means the colourmap is dominated by bright colours.
0010 %           Defaults to 0.5.
0011 %
0012 % See also: zerobright
0013 
0014 % http://en.wikipedia.org/wiki/Desert_sand_%28color%29
0015 
0016 w = optargs(varargin, {0.5});
0017 
0018 field_drap = [108, 84, 30];
0019 %sand = [194, 178, 128];
0020 %brightsand = [246, 237, 211];
0021 %brightsand = [256, 234, 169];
0022 brightsand = [256, 241, 195];
0023 %antisky = [236, 163, 134];
0024 %antisky = [236, 202, 188];
0025 %wheat = [245, 222, 179];
0026 white = [255, 255, 255];
0027 sky_blue = [135, 206, 235];
0028 midnight_blue = [25, 25, 112];
0029 
0030 pos = 1+[0, 0.5-w/2, 0.5, 0.5+w/2, 1];
0031 
0032 %pos = 1+[0, (0.5-w/2)/2, 0.5-w/2, 0.5, 0.5+w/2, 1-(0.5-w/2)/2, 1];
0033 
0034 colours = [field_drap; brightsand; white; sky_blue; midnight_blue];
0035 %colours = [field_drap; sand; white-0.01; white; white-0.01; sky_blue; midnight_blue];
0036 
0037 cmap = interp1(pos, colours, linspace(1, max(pos), 256))/256;
0038 
0039 end

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005