comparison scripts/plot/draw/meshz.m @ 19630:0e1f5a750d00

maint: Periodic merge of gui-release to default.
author John W. Eaton <jwe@octave.org>
date Tue, 20 Jan 2015 10:24:46 -0500
parents 64173c377a6b 446c46af4b42
children 4197fc428c7d
comparison
equal deleted inserted replaced
19626:37d37297acf8 19630:0e1f5a750d00
121 cdat = c(isfinite (c(:))); 121 cdat = c(isfinite (c(:)));
122 cref = (min (cdat) + max (cdat)) / 2; 122 cref = (min (cdat) + max (cdat)) / 2;
123 c = [cref .* ones(2, columns(c) + 4); 123 c = [cref .* ones(2, columns(c) + 4);
124 cref .* ones(rows(c), 2), c, cref .* ones(rows(c), 2); 124 cref .* ones(rows(c), 2), c, cref .* ones(rows(c), 2);
125 cref .* ones(2, columns(c) + 4)]; 125 cref .* ones(2, columns(c) + 4)];
126 126
127 oldfig = []; 127 oldfig = [];
128 if (! isempty (hax)) 128 if (! isempty (hax))
129 oldfig = get (0, "currentfigure"); 129 oldfig = get (0, "currentfigure");
130 endif 130 endif
131 unwind_protect 131 unwind_protect
166 166
167 %!demo 167 %!demo
168 %! clf; 168 %! clf;
169 %! colormap ('default'); 169 %! colormap ('default');
170 %! [X,Y,Z] = peaks (); 170 %! [X,Y,Z] = peaks ();
171 %! [fx, fy] = gradient (Z); 171 %! [fx, fy] = gradient (Z);
172 %! C = sqrt (fx.^2 + fy.^2); 172 %! C = sqrt (fx.^2 + fy.^2);
173 %! meshz (X,Y,Z,C); 173 %! meshz (X,Y,Z,C);
174 %! title ('meshz() plot with color determined by gradient'); 174 %! title ('meshz() plot with color determined by gradient');
175 175