Mercurial > octave-nkf
comparison scripts/plot/barh.m @ 6633:5af6275fbca9
[project @ 2007-05-17 19:44:28 by dbateman]
author | dbateman |
---|---|
date | Thu, 17 May 2007 19:44:28 +0000 |
parents | |
children | 76e3d985ae56 |
comparison
equal
deleted
inserted
replaced
6632:fc235391e58f | 6633:5af6275fbca9 |
---|---|
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{}) | |
23 ## Given two vectors of x-y data, @code{bar} produces a horizontal bar graph. | |
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. | |
50 ## @seealso{bar, plot, semilogx, semilogy, loglog, polar, mesh, contour, | |
51 ## stairs, xlabel, ylabel, title} | |
52 ## @end deftypefn | |
53 | |
54 ## Author: jwe | |
55 | |
56 function varargout = barh (varargin) | |
57 varargout = cell (nargout, 1); | |
58 [varargout{:}] = __bar__ (false, "barh", varargin{:}); | |
59 endfunction |