Mercurial > hg > octave-lyh
comparison scripts/plot/contourf.m @ 17198:df4c4b7708a4
Add titles and clean-up plotting %!demos.
* scripts/plot/area.m, scripts/plot/axis.m, scripts/plot/bar.m,
scripts/plot/barh.m, scripts/plot/clabel.m, scripts/plot/colorbar.m,
scripts/plot/comet.m, scripts/plot/comet3.m, scripts/plot/contour.m,
scripts/plot/contour3.m, scripts/plot/contourf.m, scripts/plot/cylinder.m,
scripts/plot/ellipsoid.m, scripts/plot/errorbar.m, scripts/plot/ezplot.m,
scripts/plot/ezplot3.m, scripts/plot/ezpolar.m, scripts/plot/feather.m,
scripts/plot/fplot.m, scripts/plot/hold.m, scripts/plot/isosurface.m,
scripts/plot/legend.m, scripts/plot/loglog.m, scripts/plot/loglogerr.m,
scripts/plot/mesh.m, scripts/plot/meshc.m, scripts/plot/meshz.m,
scripts/plot/patch.m, scripts/plot/pcolor.m, scripts/plot/pie.m,
scripts/plot/pie3.m, scripts/plot/plot.m, scripts/plot/plot3.m,
scripts/plot/polar.m, scripts/plot/rectangle.m, scripts/plot/ribbon.m,
scripts/plot/rose.m, scripts/plot/scatter.m, scripts/plot/scatter3.m,
scripts/plot/semilogx.m, scripts/plot/semilogxerr.m, scripts/plot/semilogy.m,
scripts/plot/semilogyerr.m, scripts/plot/sombrero.m, scripts/plot/stem3.m,
scripts/plot/surf.m, scripts/plot/surfc.m, scripts/plot/surfl.m,
scripts/plot/title.m, scripts/plot/waterfall.m: Add titles and clean-up
plotting %!demos.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 06 Aug 2013 14:34:20 -0700 |
parents | 26589abbc78d |
children | 87ba70043bfc |
comparison
equal
deleted
inserted
replaced
17197:b1fd3dc31c42 | 17198:df4c4b7708a4 |
---|---|
87 %!demo | 87 %!demo |
88 %! clf; | 88 %! clf; |
89 %! colormap ('default'); | 89 %! colormap ('default'); |
90 %! [x, y, z] = peaks (50); | 90 %! [x, y, z] = peaks (50); |
91 %! contourf (x, y, z, -7:9); | 91 %! contourf (x, y, z, -7:9); |
92 %! title ({'contourf() plot (filled contour lines)'; 'Z = peaks()'); | |
92 | 93 |
93 %!demo | 94 %!demo |
94 %! clf; | 95 %! clf; |
95 %! colormap ('default'); | 96 %! colormap ('default'); |
96 %! [theta, r] = meshgrid (linspace (0,2*pi,64), linspace (0,1,64)); | 97 %! [theta, r] = meshgrid (linspace (0,2*pi,64), linspace (0,1,64)); |
97 %! [X, Y] = pol2cart (theta, r); | 98 %! [X, Y] = pol2cart (theta, r); |
98 %! Z = sin (2*theta) .* (1-r); | 99 %! Z = sin (2*theta) .* (1-r); |
99 %! contourf (X, Y, abs (Z), 10); | 100 %! contourf (X, Y, abs (Z), 10); |
101 %! title ({'contourf() plot'; 'polar fcn Z = sin (2*theta) * (1-r)'}); | |
100 | 102 |
103 %!demo | |
104 %! clf; | |
105 %! colormap ('default'); | |
106 %! x = linspace (-2, 2); | |
107 %! [x, y] = meshgrid (x); | |
108 %! z = sqrt (x.^2 + y.^2) ./ (x.^2 + y.^2 + 1); | |
109 %! contourf (x, y, z, [0.4, 0.4]); | |
110 %! title ('Hole should be filled with the background color'); | |
111 |