Mercurial > octave
comparison scripts/image/image.m @ 14247:c4fa5e0b6193
test: Make surface demos reproducible by setting colormap to default at start of demo.
* bicubic.m, interp2.m, interpn.m, griddata.m, image.m, axis.m, clabel.m,
colorbar.m, contour.m, contourf.m, cylinder.m, ezcontour.m, ezcontourf.m,
ezmesh.m, ezmeshc.m, ezsurf.m, ezsurfc.m, hold.m, pcolor.m, plotyy.m,
quiver3.m, ribbon.m, shading.m, slice.m, sombrero.m, surf.m, surfc.m,
surfnorm.m, trisurf.m: Set colormap to default at start of demos to
make them reproducible.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 22 Jan 2012 10:02:27 -0800 |
parents | 11949c9795a0 |
children | 1f911333ed3d |
comparison
equal
deleted
inserted
replaced
14246:8b220af26cfb | 14247:c4fa5e0b6193 |
---|---|
176 endfunction | 176 endfunction |
177 | 177 |
178 | 178 |
179 %!demo | 179 %!demo |
180 %! clf; | 180 %! clf; |
181 %! colormap ("default"); | |
181 %! img = 1 ./ hilb (11); | 182 %! img = 1 ./ hilb (11); |
182 %! x = -5:5; | 183 %! x = -5:5; |
183 %! y = x; | 184 %! y = x; |
184 %! subplot (2,2,1); | 185 %! subplot (2,2,1); |
185 %! h = image (abs(x), abs(y), img); | 186 %! h = image (abs(x), abs(y), img); |
200 %! set (h, "cdatamapping", "scaled"); | 201 %! set (h, "cdatamapping", "scaled"); |
201 %! title ("image (-x, -y, img)"); | 202 %! title ("image (-x, -y, img)"); |
202 | 203 |
203 %!demo | 204 %!demo |
204 %! clf; | 205 %! clf; |
206 %! colormap ("default"); | |
205 %! g = 0.1:0.1:10; | 207 %! g = 0.1:0.1:10; |
206 %! h = g'*g; | 208 %! h = g'*g; |
207 %! imagesc (g, g, sin (h)); | 209 %! imagesc (g, g, sin (h)); |
208 %! hold on; | 210 %! hold on; |
209 %! imagesc (g, g+12, cos (h/2)); | 211 %! imagesc (g, g+12, cos (h/2)); |
211 %! hold off; | 213 %! hold off; |
212 %! title ("two consecutive images"); | 214 %! title ("two consecutive images"); |
213 | 215 |
214 %!demo | 216 %!demo |
215 %! clf; | 217 %! clf; |
218 %! colormap ("default"); | |
216 %! g = 0.1:0.1:10; | 219 %! g = 0.1:0.1:10; |
217 %! h = g'*g; | 220 %! h = g'*g; |
218 %! imagesc (g, g, sin (h)); | 221 %! imagesc (g, g, sin (h)); |
219 %! hold all; | 222 %! hold all; |
220 %! plot (g, 11.0 * ones (size (g))); | 223 %! plot (g, 11.0 * ones (size (g))); |
223 %! hold off; | 226 %! hold off; |
224 %! title ("image, line, image"); | 227 %! title ("image, line, image"); |
225 | 228 |
226 %!demo | 229 %!demo |
227 %! clf; | 230 %! clf; |
231 %! colormap ("default"); | |
228 %! g = 0.1:0.1:10; | 232 %! g = 0.1:0.1:10; |
229 %! h = g'*g; | 233 %! h = g'*g; |
230 %! plot (g, 10.5 * ones (size (g))); | 234 %! plot (g, 10.5 * ones (size (g))); |
231 %! hold all; | 235 %! hold all; |
232 %! imagesc (g, g, sin (h)); | 236 %! imagesc (g, g, sin (h)); |