source: issm/oecreview/Archive/20545-21336/ISSM-21249-21250.diff@ 21337

Last change on this file since 21337 was 21337, checked in by Mathieu Morlighem, 8 years ago

CHG: added Archive/20545-21336

File size: 2.2 KB
RevLine 
[21337]1Index: ../trunk-jpl/src/m/plot/colormaps/bluewhitered.m
2===================================================================
3--- ../trunk-jpl/src/m/plot/colormaps/bluewhitered.m (revision 21249)
4+++ ../trunk-jpl/src/m/plot/colormaps/bluewhitered.m (revision 21250)
5@@ -1,4 +1,4 @@
6-function newmap = bluewhitered(m)
7+function newmap = bluewhitered(m,CAXIS)
8 %BLUEWHITERED Blue, white, and red color map.
9 % BLUEWHITERED(M) returns an M-by-3 matrix containing a blue to white
10 % to red colormap, with white corresponding to the CAXIS value closest
11@@ -33,7 +33,6 @@
12 m = size(get(gcf,'colormap'),1);
13 end
14
15-
16 bottom = [0 0 0.5];
17 botmiddle = [0 0.5 1];
18 middle = [1 1 1];
19@@ -41,7 +40,11 @@
20 top = [0.5 0 0];
21
22 % Find middle
23-lims = get(gca, 'CLim');
24+if nargin < 2
25+ lims = get(gca, 'CLim');
26+else
27+ lims = CAXIS;
28+end
29
30 % Find ratio of negative to positive
31 if (lims(1) < 0) & (lims(2) > 0)
32@@ -119,4 +122,4 @@
33 % newmap(:,i) = min(max(interp1(oldsteps, new(:,i), newsteps)', 0), 1);
34 % end
35 %
36-% % set(gcf, 'colormap', newmap), colorbar
37\ No newline at end of file
38+% % set(gcf, 'colormap', newmap), colorbar
39Index: ../trunk-jpl/src/m/plot/colormaps/bluewhitered_smooth.m
40===================================================================
41--- ../trunk-jpl/src/m/plot/colormaps/bluewhitered_smooth.m (revision 21249)
42+++ ../trunk-jpl/src/m/plot/colormaps/bluewhitered_smooth.m (revision 21250)
43@@ -1,4 +1,4 @@
44-function newmap = bluewhitered_smooth(m)
45+function newmap = bluewhitered_smooth(m,CAXIS)
46 %BLUEWHITERED Blue, white, and red color map.
47 % BLUEWHITERED(M) returns an M-by-3 matrix containing a blue to white
48 % to red colormap, with white corresponding to the CAXIS value closest
49@@ -45,7 +45,11 @@
50 % top = [0.7 0.0 0.15];
51
52 % Find middle
53-lims = get(gca, 'CLim');
54+if nargin < 2
55+ lims = get(gca, 'CLim');
56+else
57+ lims = CAXIS;
58+end
59
60 % Find ratio of negative to positive
61 if (lims(1) < 0) & (lims(2) > 0)
62@@ -123,4 +127,4 @@
63 % newmap(:,i) = min(max(interp1(oldsteps, new(:,i), newsteps)', 0), 1);
64 % end
65 %
66-% % set(gcf, 'colormap', newmap), colorbar
67\ No newline at end of file
68+% % set(gcf, 'colormap', newmap), colorbar
Note: See TracBrowser for help on using the repository browser.