annotate scripts/plot/barh.m @ 16814:64e7bb01fce2

doc: Improve documentation for 2-D plot functions * doc/interpreter/plot.txi: Rewrite documentation around get/set. * libinterp/interpfcn/graphics.cc(Fget, Fset): Add seealso links. Add additional calling forms for get(). * scripts/plot/bar.m, scripts/plot/barh.m, scripts/plot/comet.m, scripts/plot/comet3.m, scripts/plot/contour.m, scripts/plot/contour3.m, scripts/plot/contourc.m, scripts/plot/contourf.m, scripts/plot/errorbar.m, scripts/plot/gca.m, scripts/plot/gcf.m, scripts/plot/gco.m, scripts/plot/ishghandle.m, scripts/plot/loglogerr.m, scripts/plot/pareto.m, scripts/plot/pcolor.m, scripts/plot/pie.m, scripts/plot/pie3.m, scripts/plot/plotmatrix.m, scripts/plot/plotyy.m, scripts/plot/polar.m, scripts/plot/quiver.m, scripts/plot/quiver3.m, scripts/plot/rose.m, scripts/plot/scatter.m, scripts/plot/semilogxerr.m, scripts/plot/semilogyerr.m, scripts/plot/sombrero.m, scripts/plot/stairs.m, scripts/plot/stem.m, scripts/plot/stem3.m: Improve docstrings.
author Rik <rik@octave.org>
date Sat, 22 Jun 2013 17:40:52 -0700
parents de751531e548
children eaab03308c0b
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: 14001
diff changeset
1 ## Copyright (C) 1996-2012 John W. Eaton
6633
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
2 ##
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
3 ## This file is part of Octave.
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
4 ##
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
8 ## your option) any later version.
6633
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
9 ##
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
13 ## General Public License for more details.
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
14 ##
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
17 ## <http://www.gnu.org/licenses/>.
6633
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
18
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
19 ## -*- texinfo -*-
10793
be55736a0783 Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents: 9245
diff changeset
20 ## @deftypefn {Function File} {} barh (@var{x}, @var{y})
7106
33ed85dcfaa8 [project @ 2007-11-06 18:03:08 by jwe]
jwe
parents: 7096
diff changeset
21 ## @deftypefnx {Function File} {} barh (@var{y})
33ed85dcfaa8 [project @ 2007-11-06 18:03:08 by jwe]
jwe
parents: 7096
diff changeset
22 ## @deftypefnx {Function File} {} barh (@var{x}, @var{y}, @var{w})
33ed85dcfaa8 [project @ 2007-11-06 18:03:08 by jwe]
jwe
parents: 7096
diff changeset
23 ## @deftypefnx {Function File} {} barh (@var{x}, @var{y}, @var{w}, @var{style})
16814
64e7bb01fce2 doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents: 15565
diff changeset
24 ## @deftypefnx {Function File} {} barh (@dots{}, @var{prop}, @var{val})
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents: 7106
diff changeset
25 ## @deftypefnx {Function File} {} barh (@var{h}, @dots{})
16814
64e7bb01fce2 doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents: 15565
diff changeset
26 ## @deftypefnx {Function File} {@var{h} =} barh (@dots{})
7096
81bed50b9feb [project @ 2007-11-02 16:13:43 by jwe]
jwe
parents: 7086
diff changeset
27 ## Produce a horizontal bar graph from two vectors of x-y data.
6633
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
28 ##
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
29 ## If only one argument is given, it is taken as a vector of y-values
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
30 ## and the x coordinates are taken to be the indices of the elements.
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
31 ##
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
32 ## The default width of 0.8 for the bars can be changed using @var{w}.
7096
81bed50b9feb [project @ 2007-11-02 16:13:43 by jwe]
jwe
parents: 7086
diff changeset
33 ##
6633
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
34 ## If @var{y} is a matrix, then each column of @var{y} is taken to be a
9040
dbd0c77e575e Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
35 ## separate bar graph plotted on the same graph. By default the columns
dbd0c77e575e Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
36 ## are plotted side-by-side. This behavior can be changed by the @var{style}
7086
625891845df5 [project @ 2007-10-31 17:11:49 by jwe]
jwe
parents: 7017
diff changeset
37 ## argument, which can take the values @code{"grouped"} (the default),
625891845df5 [project @ 2007-10-31 17:11:49 by jwe]
jwe
parents: 7017
diff changeset
38 ## or @code{"stacked"}.
6633
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
39 ##
16814
64e7bb01fce2 doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents: 15565
diff changeset
40 ## Passing the optional input handle @var{h} will draw the resulting plot
64e7bb01fce2 doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents: 15565
diff changeset
41 ## in the specified handle.
64e7bb01fce2 doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents: 15565
diff changeset
42 ##
8056
9a6f4713f765 Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents: 7189
diff changeset
43 ## Properties of the patch graphics object can be changed using
7096
81bed50b9feb [project @ 2007-11-02 16:13:43 by jwe]
jwe
parents: 7086
diff changeset
44 ## @var{prop}, @var{val} pairs.
6633
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
45 ##
14001
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
46 ## The optional return value @var{h} is a graphics handle to the created
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
47 ## bar series object. See @code{bar} for a description of the use of the
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
48 ## bar series.
6895
76e3d985ae56 [project @ 2007-09-13 18:22:38 by jwe]
jwe
parents: 6633
diff changeset
49 ## @seealso{bar, plot}
6633
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
50 ## @end deftypefn
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
51
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
52 ## Author: jwe
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
53
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
54 function varargout = barh (varargin)
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
55 varargout = cell (nargout, 1);
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
56 [varargout{:}] = __bar__ (false, "barh", varargin{:});
5af6275fbca9 [project @ 2007-05-17 19:44:28 by dbateman]
dbateman
parents:
diff changeset
57 endfunction
14001
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
58
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
59
15565
de751531e548 test: Add demos for bar.m and barh.m
Rik <rik@octave.org>
parents: 14138
diff changeset
60 %!demo
de751531e548 test: Add demos for bar.m and barh.m
Rik <rik@octave.org>
parents: 14138
diff changeset
61 %! clf;
de751531e548 test: Add demos for bar.m and barh.m
Rik <rik@octave.org>
parents: 14138
diff changeset
62 %! x = rand (10, 1);
de751531e548 test: Add demos for bar.m and barh.m
Rik <rik@octave.org>
parents: 14138
diff changeset
63 %! barh (x);
14001
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
64
15565
de751531e548 test: Add demos for bar.m and barh.m
Rik <rik@octave.org>
parents: 14138
diff changeset
65 %!demo
de751531e548 test: Add demos for bar.m and barh.m
Rik <rik@octave.org>
parents: 14138
diff changeset
66 %! clf;
de751531e548 test: Add demos for bar.m and barh.m
Rik <rik@octave.org>
parents: 14138
diff changeset
67 %! h = barh (rand (5, 3));
de751531e548 test: Add demos for bar.m and barh.m
Rik <rik@octave.org>
parents: 14138
diff changeset
68 %! set (h(1), 'facecolor', 'r')
de751531e548 test: Add demos for bar.m and barh.m
Rik <rik@octave.org>
parents: 14138
diff changeset
69 %! set (h(2), 'facecolor', 'g')
de751531e548 test: Add demos for bar.m and barh.m
Rik <rik@octave.org>
parents: 14138
diff changeset
70 %! set (h(3), 'facecolor', 'b')
de751531e548 test: Add demos for bar.m and barh.m
Rik <rik@octave.org>
parents: 14138
diff changeset
71