Mercurial > hg > octave-nkf
comparison scripts/plot/fplot.m @ 17190: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 | d74e2b5bdeb5 |
children | bdb237c7507c |
comparison
equal
deleted
inserted
replaced
17189:b1fd3dc31c42 | 17190:df4c4b7708a4 |
---|---|
182 | 182 |
183 | 183 |
184 %!demo | 184 %!demo |
185 %! clf; | 185 %! clf; |
186 %! fplot (@cos, [0, 2*pi]); | 186 %! fplot (@cos, [0, 2*pi]); |
187 %! title ('fplot() single function'); | |
187 | 188 |
188 %!demo | 189 %!demo |
189 %! clf; | 190 %! clf; |
190 %! fplot ('[cos(x), sin(x)]', [0, 2*pi]); | 191 %! fplot ('[cos(x), sin(x)]', [0, 2*pi]); |
192 %! title ('fplot() multiple functions'); | |
191 | 193 |
192 %!demo | 194 %!demo |
193 %! clf; | 195 %! clf; |
194 %! ## sinc function | 196 %! %% sinc function |
195 %! fh = @(x) sin (pi*x) ./ (pi*x); | 197 %! fh = @(x) sin (pi*x) ./ (pi*x); |
196 %! fplot (fh, [-5, 5]); | 198 %! fplot (fh, [-5, 5]); |
199 %! title ('fplot() sinc function'); | |
197 | 200 |
198 %!test | 201 %!test |
199 %! [x, y] = fplot ("[cos(x), sin(x)]", [0, 2*pi]); | 202 %! [x, y] = fplot ("[cos(x), sin(x)]", [0, 2*pi]); |
200 %! assert (columns (y) == 2); | 203 %! assert (columns (y) == 2); |
201 %! assert (rows (x) == rows (y)); | 204 %! assert (rows (x) == rows (y)); |