annotate scripts/plot/stem3.m @ 14237:11949c9795a0

Revamp %!demos in m-files to use Octave coding conventions on spacing, etc. Add clf() to all demos using plot features to get reproducibility. Use 64 as input to all colormaps (jet (64)) to get reproducibility. * bicubic.m, cell2mat.m, celldisp.m, cplxpair.m, interp1.m, interp2.m, interpft.m, interpn.m, profile.m, profshow.m, convhull.m, delaunay.m, griddata.m, inpolygon.m, voronoi.m, autumn.m, bone.m, contrast.m, cool.m, copper.m, flag.m, gmap40.m, gray.m, hot.m, hsv.m, image.m, imshow.m, jet.m, ocean.m, pink.m, prism.m, rainbow.m, spring.m, summer.m, white.m, winter.m, condest.m, onenormest.m, axis.m, clabel.m, colorbar.m, comet.m, comet3.m, compass.m, contour.m, contour3.m, contourf.m, cylinder.m, daspect.m, ellipsoid.m, errorbar.m, ezcontour.m, ezcontourf.m, ezmesh.m, ezmeshc.m, ezplot.m, ezplot3.m, ezpolar.m, ezsurf.m, ezsurfc.m, feather.m, fill.m, fplot.m, grid.m, hold.m, isosurface.m, legend.m, loglog.m, loglogerr.m, pareto.m, patch.m, pbaspect.m, pcolor.m, pie.m, pie3.m, plot3.m, plotmatrix.m, plotyy.m, polar.m, quiver.m, quiver3.m, rectangle.m, refreshdata.m, ribbon.m, rose.m, scatter.m, scatter3.m, semilogx.m, semilogxerr.m, semilogy.m, semilogyerr.m, shading.m, slice.m, sombrero.m, stairs.m, stem.m, stem3.m, subplot.m, surf.m, surfc.m, surfl.m, surfnorm.m, text.m, title.m, trimesh.m, triplot.m, trisurf.m, uigetdir.m, uigetfile.m, uimenu.m, uiputfile.m, waitbar.m, xlim.m, ylim.m, zlim.m, mkpp.m, pchip.m, polyaffine.m, spline.m, bicgstab.m, cgs.m, gplot.m, pcg.m, pcr.m, treeplot.m, strtok.m, demo.m, example.m, rundemos.m, speed.m, test.m, calendar.m, datestr.m, datetick.m, weekday.m: Revamp %!demos to use Octave coding conventions on spacing, etc.
author Rik <octave@nomad.inbox5.com>
date Fri, 20 Jan 2012 12:59:53 -0800
parents 72c96de7a403
children f3d52523cde1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14138
72c96de7a403 maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents: 14092
diff changeset
1 ## Copyright (C) 2007-2012 David Bateman
7217
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
2 ##
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
3 ## This file is part of Octave.
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
4 ##
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
8 ## your option) any later version.
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
9 ##
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
13 ## General Public License for more details.
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
14 ##
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
18
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
19 ## -*- texinfo -*-
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
20 ## @deftypefn {Function File} {@var{h} =} stem3 (@var{x}, @var{y}, @var{z}, @var{linespec})
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
21 ## Plot a three-dimensional stem graph and return the handles of the line
8052
961d4c52ffae Convert stem and stem3 to use stem series objects
David Bateman <dbateman@free.fr>
parents: 7245
diff changeset
22 ## and marker objects used to draw the stems as "stem series" object.
961d4c52ffae Convert stem and stem3 to use stem series objects
David Bateman <dbateman@free.fr>
parents: 7245
diff changeset
23 ## The default color is @code{"r"} (red). The default line style is
961d4c52ffae Convert stem and stem3 to use stem series objects
David Bateman <dbateman@free.fr>
parents: 7245
diff changeset
24 ## @code{"-"} and the default marker is @code{"o"}.
7217
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
25 ##
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
26 ## For example,
10846
a4f482e66b65 Grammarcheck more of the documentation.
Rik <octave@nomad.inbox5.com>
parents: 10791
diff changeset
27 ##
7217
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
28 ## @example
9051
1bf0ce0930be Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents: 9040
diff changeset
29 ## @group
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
30 ## theta = 0:0.2:6;
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
31 ## stem3 (cos (theta), sin (theta), theta)
9051
1bf0ce0930be Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents: 9040
diff changeset
32 ## @end group
7217
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
33 ## @end example
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
34 ##
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
35 ## @noindent
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
36 ## plots 31 stems with heights from 0 to 6 lying on a circle. Color
10791
3140cb7a05a1 Add spellchecker scripts for Octave and run spellcheck of documentation
Rik <octave@nomad.inbox5.com>
parents: 9245
diff changeset
37 ## definitions with RGB-triples are not valid!
7217
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
38 ## @seealso{bar, barh, stem, plot}
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
39 ## @end deftypefn
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
40
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
41 function h = stem3 (varargin)
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
42
7219
ef3fad1f36da [project @ 2007-11-29 22:13:29 by dbateman]
dbateman
parents: 7218
diff changeset
43 if (nargin < 1 || nargin > 4)
7218
02eb1619b857 [project @ 2007-11-29 21:10:55 by jwe]
jwe
parents: 7217
diff changeset
44 print_usage ();
02eb1619b857 [project @ 2007-11-29 21:10:55 by jwe]
jwe
parents: 7217
diff changeset
45 endif
02eb1619b857 [project @ 2007-11-29 21:10:55 by jwe]
jwe
parents: 7217
diff changeset
46
7217
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
47 tmp = __stem__ (true, varargin{:});
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
48
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
49 if (nargout > 0)
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
50 h = tmp;
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
51 endif
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
52
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
53 endfunction
7245
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7219
diff changeset
54
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
55
7245
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7219
diff changeset
56 %!demo
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
57 %! clf;
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
58 %! theta = 0:0.2:6;
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
59 %! stem3 (cos(theta), sin(theta), theta);
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
60