comparison scripts/plot/bar.m @ 7096:81bed50b9feb

[project @ 2007-11-02 16:13:43 by jwe]
author jwe
date Fri, 02 Nov 2007 16:13:44 +0000
parents 625891845df5
children 33ed85dcfaa8
comparison
equal deleted inserted replaced
7095:efd16513ff8f 7096:81bed50b9feb
16 ## You should have received a copy of the GNU General Public License 16 ## You should have received a copy of the GNU General Public License
17 ## along with Octave; see the file COPYING. If not, see 17 ## along with Octave; see the file COPYING. If not, see
18 ## <http://www.gnu.org/licenses/>. 18 ## <http://www.gnu.org/licenses/>.
19 19
20 ## -*- texinfo -*- 20 ## -*- texinfo -*-
21 ## @deftypefn {Function File} {@var{h} =} bar (@var{x}, @var{y}, @var{p1}, @var{v1}, @dots{}) 21 ## @deftypefn {Function File} bar (@var{x}, @var{y})
22 ## @deftypefnx {Function File} {[@var{xb}, @var{yb}] =} bar (@dots{}) 22 ## @deftypefnx {Function File} bar (@var{y})
23 ## Given two vectors of x-y data, @code{bar} produce a bar graph. 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 (...,@var{prop}, @var{val})
26 ## Produce a bar graph from two vectors of x-y data.
24 ## 27 ##
25 ## If only one argument is given, it is taken as a vector of y-values 28 ## 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. 29 ## and the x coordinates are taken to be the indices of the elements.
30 ##
31 ## The default width of 0.8 for the bars can be changed using @var{w}.
27 ## 32 ##
28 ## If @var{y} is a matrix, then each column of @var{y} is taken to be a 33 ## 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 34 ## 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} 35 ## are plotted side-by-side. This behavior can be changed by the @var{style}
31 ## argument, which can take the values @code{"grouped"} (the default), 36 ## argument, which can take the values @code{"grouped"} (the default),
32 ## or @code{"stacked"}. 37 ## or @code{"stacked"}.
33 ## 38 ##
34 ## If two output arguments are specified, the data are generated but 39 ## The optional return value @var{h} provides a handle to the patch object.
35 ## not plotted. For example, 40 ## Properties of the patch graphics object can be changed using
41 ## @var{prop}, @var{val} pairs.
36 ## 42 ##
37 ## @example 43 ## @seealso{barh, plot}
38 ## bar (x, y);
39 ## @end example
40 ##
41 ## @noindent
42 ## and
43 ##
44 ## @example
45 ## [xb, yb] = bar (x, y);
46 ## plot (xb, yb);
47 ## @end example
48 ##
49 ## @noindent
50 ## are equivalent.
51 ## @seealso{hbar, plot}
52 ## @end deftypefn 44 ## @end deftypefn
53 45
54 ## Author: jwe 46 ## Author: jwe
55 47
56 function varargout = bar (varargin) 48 function varargout = bar (varargin)