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 -*- |
7096
|
20 ## @deftypefn {Function File} barh (@var{x}, @var{y}) |
|
21 ## @deftypefnx {Function File} barh (@var{y}) |
|
22 ## @deftypefnx {Function File} barh (@var{x}, @var{y}, @var{w}) |
|
23 ## @deftypefnx {Function File} barh (@var{x}, @var{y}, @var{w}, @var{style}) |
|
24 ## @deftypefnx {Function File} {@var{h} =} barh (...,@var{prop}, @var{val}) |
|
25 ## Produce a horizontal bar graph from two vectors of x-y data. |
6633
|
26 ## |
|
27 ## If only one argument is given, it is taken as a vector of y-values |
|
28 ## and the x coordinates are taken to be the indices of the elements. |
|
29 ## |
7096
|
30 ## The default width of 0.8 for the bars can be changed using @var{w}. |
|
31 ## |
6633
|
32 ## If @var{y} is a matrix, then each column of @var{y} is taken to be a |
|
33 ## separate bar graph plotted on the same graph. By default the columns |
|
34 ## are plotted side-by-side. This behavior can be changed by the @var{style} |
7086
|
35 ## argument, which can take the values @code{"grouped"} (the default), |
|
36 ## or @code{"stacked"}. |
6633
|
37 ## |
7096
|
38 ## The optional return value @var{h} provides a handle to the patch object. |
|
39 ## Properties of the patch graphics object can be changed using |
|
40 ## @var{prop}, @var{val} pairs. |
6633
|
41 ## |
6895
|
42 ## @seealso{bar, plot} |
6633
|
43 ## @end deftypefn |
|
44 |
|
45 ## Author: jwe |
|
46 |
|
47 function varargout = barh (varargin) |
|
48 varargout = cell (nargout, 1); |
|
49 [varargout{:}] = __bar__ (false, "barh", varargin{:}); |
|
50 endfunction |