Mercurial > hg > octave-lyh
annotate scripts/plot/bar.m @ 9040:dbd0c77e575e
Cleanup documentation file plot.texi
Spellcheck
Stylecheck (Mostly double spaces after periods)
author | Rik <rdrider0-list@yahoo.com> |
---|---|
date | Sun, 22 Mar 2009 14:40:24 -0700 |
parents | eb63fbe60fab |
children | 16f53d29049f |
rev | line source |
---|---|
7017 | 1 ## Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2004, |
8920 | 2 ## 2005, 2006, 2007, 2008 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 |
9040
dbd0c77e575e
Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
35 ## separate bar graph plotted on the same graph. By default the columns |
dbd0c77e575e
Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
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 ## |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
40 ## The optional return value @var{h} provides a handle to the "bar series" |
9040
dbd0c77e575e
Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
41 ## object with one handle per column of the variable @var{y}. This |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
42 ## series allows common elements of the group of bar series objects to |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
43 ## be changed in a single bar series and the same properties are changed |
9040
dbd0c77e575e
Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
44 ## in the other "bar series". For example |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
45 ## |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
46 ## @example |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
47 ## @group |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
48 ## h = bar (rand (5, 10)); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
49 ## set (h(1), "basevalue", 0.5); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
50 ## @end group |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
51 ## @end example |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
52 ## |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
53 ## @noindent |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
54 ## changes the position on the base of all of the bar series. |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
55 ## |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
56 ## The optional input handle @var{h} allows an axis handle to be passed. |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
57 ## Properties of the patch graphics object can be changed using |
7096 | 58 ## @var{prop}, @var{val} pairs. |
3426 | 59 ## |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7189
diff
changeset
|
60 ## @seealso{barh, plot} |
3368 | 61 ## @end deftypefn |
4 | 62 |
2314 | 63 ## Author: jwe |
64 | |
6540 | 65 function varargout = bar (varargin) |
66 varargout = cell (nargout, 1); | |
67 [varargout{:}] = __bar__ (true, "bar", varargin{:}); | |
4 | 68 endfunction |