annotate scripts/plot/stem3.m @ 7218:02eb1619b857

[project @ 2007-11-29 21:10:55 by jwe]
author jwe
date Thu, 29 Nov 2007 21:10:55 +0000
parents c8abc18322b7
children ef3fad1f36da
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7217
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
1 ## Copyright (C) 2007 David Bateman
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
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
22 ## and marker objects used to draw the stems. The default color is @code{"r"}
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
23 ## (red). The default line style is @code{"-"} and the default marker is
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
24 ## @code{"o"}.
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,
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
27 ## @example
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
28 ## theta = 0:0.2:6;
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
29 ## stem3 (cos (theta), sin (theta), theta)
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
30 ## @end example
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
31 ##
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
32 ## @noindent
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
33 ## plots 31 stems with heights from 0 to 6 lying on a circle. Color
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
34 ## definitions with rgb-triples are not valid!
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
35 ## @seealso{bar, barh, stem, plot}
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
36 ## @end deftypefn
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
37
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
38 function h = stem3 (varargin)
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
39
7218
02eb1619b857 [project @ 2007-11-29 21:10:55 by jwe]
jwe
parents: 7217
diff changeset
40 if (nargin < 3 || nargin > 4)
02eb1619b857 [project @ 2007-11-29 21:10:55 by jwe]
jwe
parents: 7217
diff changeset
41 print_usage ();
02eb1619b857 [project @ 2007-11-29 21:10:55 by jwe]
jwe
parents: 7217
diff changeset
42 endif
02eb1619b857 [project @ 2007-11-29 21:10:55 by jwe]
jwe
parents: 7217
diff changeset
43
7217
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
44 tmp = __stem__ (true, varargin{:});
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
45
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
46 if (nargout > 0)
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
47 h = tmp;
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
48 endif
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
49
c8abc18322b7 [project @ 2007-11-29 20:50:24 by jwe]
jwe
parents:
diff changeset
50 endfunction