7017
|
1 ## Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2004, |
|
2 ## 2005, 2006, 2007 John W. Eaton |
2313
|
3 ## |
|
4 ## This file is part of Octave. |
|
5 ## |
|
6 ## Octave is free software; you can redistribute it and/or modify it |
|
7 ## under the terms of the GNU General Public License as published by |
7016
|
8 ## the Free Software Foundation; either version 3 of the License, or (at |
|
9 ## your option) any later version. |
2313
|
10 ## |
|
11 ## Octave is distributed in the hope that it will be useful, but |
|
12 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
14 ## General Public License for more details. |
|
15 ## |
|
16 ## You should have received a copy of the GNU General Public License |
7016
|
17 ## along with Octave; see the file COPYING. If not, see |
|
18 ## <http://www.gnu.org/licenses/>. |
245
|
19 |
3368
|
20 ## -*- texinfo -*- |
7106
|
21 ## @deftypefn {Function File} {} bar (@var{x}, @var{y}) |
|
22 ## @deftypefnx {Function File} {} bar (@var{y}) |
|
23 ## @deftypefnx {Function File} {} bar (@var{x}, @var{y}, @var{w}) |
|
24 ## @deftypefnx {Function File} {} bar (@var{x}, @var{y}, @var{w}, @var{style}) |
|
25 ## @deftypefnx {Function File} {@var{h} =} bar (@dots{}, @var{prop}, @var{val}) |
7189
|
26 ## @deftypefnx {Function File} {} bar (@var{h}, @dots{}) |
7096
|
27 ## Produce a bar graph from two vectors of x-y data. |
3426
|
28 ## |
2311
|
29 ## If only one argument is given, it is taken as a vector of y-values |
|
30 ## and the x coordinates are taken to be the indices of the elements. |
3426
|
31 ## |
7096
|
32 ## The default width of 0.8 for the bars can be changed using @var{w}. |
|
33 ## |
6540
|
34 ## If @var{y} is a matrix, then each column of @var{y} is taken to be a |
|
35 ## separate bar graph plotted on the same graph. By default the columns |
|
36 ## are plotted side-by-side. This behavior can be changed by the @var{style} |
7086
|
37 ## argument, which can take the values @code{"grouped"} (the default), |
|
38 ## or @code{"stacked"}. |
6540
|
39 ## |
7096
|
40 ## The optional return value @var{h} provides a handle to the patch object. |
7189
|
41 ## Whereas the option input handle @var{h} allows an axis handle to be passed. |
7096
|
42 ## Properties of the patch graphics object can be changed using |
|
43 ## @var{prop}, @var{val} pairs. |
3426
|
44 ## |
7096
|
45 ## @seealso{barh, plot} |
3368
|
46 ## @end deftypefn |
4
|
47 |
2314
|
48 ## Author: jwe |
|
49 |
6540
|
50 function varargout = bar (varargin) |
|
51 varargout = cell (nargout, 1); |
|
52 [varargout{:}] = __bar__ (true, "bar", varargin{:}); |
4
|
53 endfunction |