source:
issm/oecreview/Archive/20545-21336/ISSM-21249-21250.diff@
21337
Last change on this file since 21337 was 21337, checked in by , 8 years ago | |
---|---|
File size: 2.2 KB |
-
../trunk-jpl/src/m/plot/colormaps/bluewhitered.m
1 function newmap = bluewhitered(m )1 function newmap = bluewhitered(m,CAXIS) 2 2 %BLUEWHITERED Blue, white, and red color map. 3 3 % BLUEWHITERED(M) returns an M-by-3 matrix containing a blue to white 4 4 % to red colormap, with white corresponding to the CAXIS value closest … … 33 33 m = size(get(gcf,'colormap'),1); 34 34 end 35 35 36 37 36 bottom = [0 0 0.5]; 38 37 botmiddle = [0 0.5 1]; 39 38 middle = [1 1 1]; … … 41 40 top = [0.5 0 0]; 42 41 43 42 % Find middle 44 lims = get(gca, 'CLim'); 43 if nargin < 2 44 lims = get(gca, 'CLim'); 45 else 46 lims = CAXIS; 47 end 45 48 46 49 % Find ratio of negative to positive 47 50 if (lims(1) < 0) & (lims(2) > 0) … … 119 122 % newmap(:,i) = min(max(interp1(oldsteps, new(:,i), newsteps)', 0), 1); 120 123 % end 121 124 % 122 % % set(gcf, 'colormap', newmap), colorbar 123 No newline at end of file 125 % % set(gcf, 'colormap', newmap), colorbar -
../trunk-jpl/src/m/plot/colormaps/bluewhitered_smooth.m
1 function newmap = bluewhitered_smooth(m )1 function newmap = bluewhitered_smooth(m,CAXIS) 2 2 %BLUEWHITERED Blue, white, and red color map. 3 3 % BLUEWHITERED(M) returns an M-by-3 matrix containing a blue to white 4 4 % to red colormap, with white corresponding to the CAXIS value closest … … 45 45 % top = [0.7 0.0 0.15]; 46 46 47 47 % Find middle 48 lims = get(gca, 'CLim'); 48 if nargin < 2 49 lims = get(gca, 'CLim'); 50 else 51 lims = CAXIS; 52 end 49 53 50 54 % Find ratio of negative to positive 51 55 if (lims(1) < 0) & (lims(2) > 0) … … 123 127 % newmap(:,i) = min(max(interp1(oldsteps, new(:,i), newsteps)', 0), 1); 124 128 % end 125 129 % 126 % % set(gcf, 'colormap', newmap), colorbar 127 No newline at end of file 130 % % set(gcf, 'colormap', newmap), colorbar
Note:
See TracBrowser
for help on using the repository browser.