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