6633
|
1 ## Copyright (C) 1996, 1997 John W. Eaton |
|
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 2, or (at your option) |
|
8 ## 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, write to the Free |
|
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
18 ## 02110-1301, USA. |
|
19 |
|
20 ## -*- texinfo -*- |
|
21 ## @deftypefn {Function File} {@var{h} =} barh (@var{x}, @var{y}, @var{style}) |
|
22 ## @deftypefnx {Function File} {[@var{xb}, @var{yb}] =} barh (@dots{}) |
6895
|
23 ## Given two vectors of x-y data, @code{bar} produce a horizontal bar graph. |
6633
|
24 ## |
|
25 ## If only one argument is given, it is taken as a vector of y-values |
|
26 ## and the x coordinates are taken to be the indices of the elements. |
|
27 ## |
|
28 ## If @var{y} is a matrix, then each column of @var{y} is taken to be a |
|
29 ## separate bar graph plotted on the same graph. By default the columns |
|
30 ## are plotted side-by-side. This behavior can be changed by the @var{style} |
|
31 ## argument, which can take the values 'group' (the default), or 'stack'. |
|
32 ## |
|
33 ## If two output arguments are specified, the data are generated but |
|
34 ## not plotted. For example, |
|
35 ## |
|
36 ## @example |
|
37 ## barh (x, y); |
|
38 ## @end example |
|
39 ## |
|
40 ## @noindent |
|
41 ## and |
|
42 ## |
|
43 ## @example |
|
44 ## [xb, yb] = barh (x, y); |
|
45 ## plot (xb, yb); |
|
46 ## @end example |
|
47 ## |
|
48 ## @noindent |
|
49 ## are equivalent. |
6895
|
50 ## @seealso{bar, plot} |
6633
|
51 ## @end deftypefn |
|
52 |
|
53 ## Author: jwe |
|
54 |
|
55 function varargout = barh (varargin) |
|
56 varargout = cell (nargout, 1); |
|
57 [varargout{:}] = __bar__ (false, "barh", varargin{:}); |
|
58 endfunction |