Mercurial > hg > octave-nkf
annotate scripts/plot/stem3.m @ 16830:4c51eaffa9e4
Update Text object color after property value has changed (bug #37007).
* libinterp/interpfcn/graphics.in.h(update_color): After changing color
property call update_text_extent() to force renderer to redraw.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 23 Jun 2013 19:38:59 -0700 |
parents | 64e7bb01fce2 |
children | b2cbf369837e |
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 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
19 ## -*- texinfo -*- | |
16814
64e7bb01fce2
doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
20 ## @deftypefn {Function File} {} stem3 (@var{x}, @var{y}, @var{z}) |
64e7bb01fce2
doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
21 ## @deftypefnx {Function File} {} stem3 (@var{x}, @var{y}, @var{z}, @var{linespec}) |
64e7bb01fce2
doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
22 ## @deftypefnx {Function File} {@var{h} =} stem3 (@dots{}) |
7217 | 23 ## 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
|
24 ## 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
|
25 ## 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
|
26 ## @code{"-"} and the default marker is @code{"o"}. |
7217 | 27 ## |
28 ## For example, | |
10846
a4f482e66b65
Grammarcheck more of the documentation.
Rik <octave@nomad.inbox5.com>
parents:
10791
diff
changeset
|
29 ## |
7217 | 30 ## @example |
9051
1bf0ce0930be
Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents:
9040
diff
changeset
|
31 ## @group |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
32 ## theta = 0:0.2:6; |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
33 ## stem3 (cos (theta), sin (theta), theta) |
9051
1bf0ce0930be
Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents:
9040
diff
changeset
|
34 ## @end group |
7217 | 35 ## @end example |
36 ## | |
37 ## @noindent | |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
38 ## 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
|
39 ## definitions with RGB-triples are not valid! |
16814
64e7bb01fce2
doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
40 ## @seealso{stem, bar, barh, plot} |
7217 | 41 ## @end deftypefn |
42 | |
43 function h = stem3 (varargin) | |
44 | |
7219 | 45 if (nargin < 1 || nargin > 4) |
7218 | 46 print_usage (); |
47 endif | |
48 | |
7217 | 49 tmp = __stem__ (true, varargin{:}); |
50 | |
51 if (nargout > 0) | |
52 h = tmp; | |
53 endif | |
54 | |
55 endfunction | |
7245 | 56 |
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 |
7245 | 58 %!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
|
59 %! clf; |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
60 %! theta = 0:0.2:6; |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14237
diff
changeset
|
61 %! stem3 (cos (theta), sin (theta), theta); |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
62 |