Index: /issm/trunk-jpl/src/m/plot/colormaps/bluewhitered_smooth.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/colormaps/bluewhitered_smooth.m	(revision 19349)
+++ /issm/trunk-jpl/src/m/plot/colormaps/bluewhitered_smooth.m	(revision 19349)
@@ -0,0 +1,126 @@
+function newmap = bluewhitered_smooth(m)
+%BLUEWHITERED   Blue, white, and red color map.
+%   BLUEWHITERED(M) returns an M-by-3 matrix containing a blue to white
+%   to red colormap, with white corresponding to the CAXIS value closest
+%   to zero.  This colormap is most useful for images and surface plots
+%   with positive and negative values.  BLUEWHITERED, by itself, is the
+%   same length as the current colormap.
+%
+%   Examples:
+%   ------------------------------
+%   figure
+%   imagesc(peaks(250));
+%   colormap(bluewhitered(256)), colorbar
+%
+%   figure
+%   imagesc(peaks(250), [0 8])
+%   colormap(bluewhitered), colorbar
+%
+%   figure
+%   imagesc(peaks(250), [-6 0])
+%   colormap(bluewhitered), colorbar
+%
+%   figure
+%   surf(peaks)
+%   colormap(bluewhitered)
+%   axis tight
+%
+%   See also HSV, HOT, COOL, BONE, COPPER, PINK, FLAG, 
+%   COLORMAP, RGBPLOT.
+
+
+if nargin < 1
+   m = size(get(gcf,'colormap'),1);
+end
+
+bottom = [50 50 190]/255;
+botmiddle = [145 145 215]/255;
+middle = [240 240 240]/255;
+topmiddle = [215 145 145]/255;
+top = [190 50 50]/255;
+% bottom = [0.25 0.3 0.75];
+% botmiddle = [0.55 0.57 0.8];
+% middle = [0.85 0.85 0.85];
+% topmiddle = [0.77 0.43 0.5];
+% top = [0.7 0.0 0.15];
+
+% Find middle
+lims = get(gca, 'CLim');
+
+% Find ratio of negative to positive
+if (lims(1) < 0) & (lims(2) > 0)
+    % It has both negative and positive
+    % Find ratio of negative to positive
+    ratio = abs(lims(1)) / (abs(lims(1)) + lims(2));
+    neglen = round(m*ratio);
+    poslen = m - neglen;
+    
+    % Just negative
+    new = [bottom; botmiddle; middle];
+    len = length(new);
+    oldsteps = linspace(0, 1, len);
+    newsteps = linspace(0, 1, neglen);
+    newmap1 = zeros(neglen, 3);
+    
+    for i=1:3
+        % Interpolate over RGB spaces of colormap
+        newmap1(:,i) = min(max(interp1(oldsteps, new(:,i), newsteps)', 0), 1);
+    end
+    
+    % Just positive
+    new = [middle; topmiddle; top];
+    len = length(new);
+    oldsteps = linspace(0, 1, len);
+    newsteps = linspace(0, 1, poslen);
+    newmap = zeros(poslen, 3);
+    
+    for i=1:3
+        % Interpolate over RGB spaces of colormap
+        newmap(:,i) = min(max(interp1(oldsteps, new(:,i), newsteps)', 0), 1);
+    end
+    
+    % And put 'em together
+    newmap = [newmap1; newmap];
+    
+elseif lims(1) >= 0
+    % Just positive
+    new = [middle; topmiddle; top];
+    len = length(new);
+    oldsteps = linspace(0, 1, len);
+    newsteps = linspace(0, 1, m);
+    newmap = zeros(m, 3);
+    
+    for i=1:3
+        % Interpolate over RGB spaces of colormap
+        newmap(:,i) = min(max(interp1(oldsteps, new(:,i), newsteps)', 0), 1);
+    end
+    
+else
+    % Just negative
+    new = [bottom; botmiddle; middle];
+    len = length(new);
+    oldsteps = linspace(0, 1, len);
+    newsteps = linspace(0, 1, m);
+    newmap = zeros(m, 3);
+    
+    for i=1:3
+        % Interpolate over RGB spaces of colormap
+        newmap(:,i) = min(max(interp1(oldsteps, new(:,i), newsteps)', 0), 1);
+    end
+    
+end
+% 
+% m = 64;
+% new = [bottom; botmiddle; middle; topmiddle; top];
+% % x = 1:m;
+% 
+% oldsteps = linspace(0, 1, 5);
+% newsteps = linspace(0, 1, m);
+% newmap = zeros(m, 3);
+% 
+% for i=1:3
+%     % Interpolate over RGB spaces of colormap
+%     newmap(:,i) = min(max(interp1(oldsteps, new(:,i), newsteps)', 0), 1);
+% end
+% 
+% % set(gcf, 'colormap', newmap), colorbar
Index: /issm/trunk-jpl/src/m/plot/colormaps/lbmap.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/colormaps/lbmap.m	(revision 19348)
+++ /issm/trunk-jpl/src/m/plot/colormaps/lbmap.m	(revision 19349)
@@ -56,4 +56,6 @@
 	case 'redblue'
 		baseMap = RedBlueMap;
+	case 'bluered'
+		baseMap = BlueRedMap;
 	otherwise
 		error(['Invalid scheme ' scheme])
@@ -108,2 +110,15 @@
 	0 170 226;
 	0 116 188]/255;
+
+function baseMap = BlueRedMap
+	baseMap = [0 116 188;
+	0 170 226;
+	68 199 239;
+	154 217 238;
+	216 236 241;
+	242 238 197;
+	249 216 168;
+	245 177 139;
+	239 133 122;
+	216  82  88;
+	175  53  71]/255;
