Index: ../trunk-jpl/src/m/plot/colormaps/bluewhitered.m =================================================================== --- ../trunk-jpl/src/m/plot/colormaps/bluewhitered.m (revision 21249) +++ ../trunk-jpl/src/m/plot/colormaps/bluewhitered.m (revision 21250) @@ -1,4 +1,4 @@ -function newmap = bluewhitered(m) +function newmap = bluewhitered(m,CAXIS) %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 @@ -33,7 +33,6 @@ m = size(get(gcf,'colormap'),1); end - bottom = [0 0 0.5]; botmiddle = [0 0.5 1]; middle = [1 1 1]; @@ -41,7 +40,11 @@ top = [0.5 0 0]; % Find middle -lims = get(gca, 'CLim'); +if nargin < 2 + lims = get(gca, 'CLim'); +else + lims = CAXIS; +end % Find ratio of negative to positive if (lims(1) < 0) & (lims(2) > 0) @@ -119,4 +122,4 @@ % newmap(:,i) = min(max(interp1(oldsteps, new(:,i), newsteps)', 0), 1); % end % -% % set(gcf, 'colormap', newmap), colorbar \ No newline at end of file +% % set(gcf, 'colormap', newmap), colorbar Index: ../trunk-jpl/src/m/plot/colormaps/bluewhitered_smooth.m =================================================================== --- ../trunk-jpl/src/m/plot/colormaps/bluewhitered_smooth.m (revision 21249) +++ ../trunk-jpl/src/m/plot/colormaps/bluewhitered_smooth.m (revision 21250) @@ -1,4 +1,4 @@ -function newmap = bluewhitered_smooth(m) +function newmap = bluewhitered_smooth(m,CAXIS) %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 @@ -45,7 +45,11 @@ % top = [0.7 0.0 0.15]; % Find middle -lims = get(gca, 'CLim'); +if nargin < 2 + lims = get(gca, 'CLim'); +else + lims = CAXIS; +end % Find ratio of negative to positive if (lims(1) < 0) & (lims(2) > 0) @@ -123,4 +127,4 @@ % newmap(:,i) = min(max(interp1(oldsteps, new(:,i), newsteps)', 0), 1); % end % -% % set(gcf, 'colormap', newmap), colorbar \ No newline at end of file +% % set(gcf, 'colormap', newmap), colorbar