Mercurial > hg > octave-avbm
changeset 6633:5af6275fbca9
[project @ 2007-05-17 19:44:28 by dbateman]
author | dbateman |
---|---|
date | Thu, 17 May 2007 19:44:28 +0000 |
parents | fc235391e58f |
children | 8c2fff7b50b0 |
files | scripts/ChangeLog scripts/plot/__bar__.m scripts/plot/barh.m scripts/plot/hbar.m |
diffstat | 4 files changed, 65 insertions(+), 60 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2007-05-17 David Bateman <dbateman@free.fr> + + * plot/hbar.m: Remove. + * plot/barh.m: and move it here. + 2007-05-16 Søren Hauberg <soren@hauberg.org> * general/sub2ind.m, general/ind2sub.m: Doc fix.
--- a/scripts/plot/__bar__.m +++ b/scripts/plot/__bar__.m @@ -19,7 +19,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} __bar__ (@dots{}) -## Support function for @ode{bar} and {hbar}. +## Support function for @code{bar} and @code{hbar}. ## @seealso{bar, hbar} ## @end deftypefn
new file mode 100644 --- /dev/null +++ b/scripts/plot/barh.m @@ -0,0 +1,59 @@ +## Copyright (C) 1996, 1997 John W. Eaton +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, write to the Free +## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +## 02110-1301, USA. + +## -*- texinfo -*- +## @deftypefn {Function File} {@var{h} =} barh (@var{x}, @var{y}, @var{style}) +## @deftypefnx {Function File} {[@var{xb}, @var{yb}] =} barh (@dots{}) +## Given two vectors of x-y data, @code{bar} produces a horizontal bar graph. +## +## If only one argument is given, it is taken as a vector of y-values +## and the x coordinates are taken to be the indices of the elements. +## +## If @var{y} is a matrix, then each column of @var{y} is taken to be a +## separate bar graph plotted on the same graph. By default the columns +## are plotted side-by-side. This behavior can be changed by the @var{style} +## argument, which can take the values 'group' (the default), or 'stack'. +## +## If two output arguments are specified, the data are generated but +## not plotted. For example, +## +## @example +## barh (x, y); +## @end example +## +## @noindent +## and +## +## @example +## [xb, yb] = barh (x, y); +## plot (xb, yb); +## @end example +## +## @noindent +## are equivalent. +## @seealso{bar, plot, semilogx, semilogy, loglog, polar, mesh, contour, +## stairs, xlabel, ylabel, title} +## @end deftypefn + +## Author: jwe + +function varargout = barh (varargin) + varargout = cell (nargout, 1); + [varargout{:}] = __bar__ (false, "barh", varargin{:}); +endfunction
deleted file mode 100644 --- a/scripts/plot/hbar.m +++ /dev/null @@ -1,59 +0,0 @@ -## Copyright (C) 1996, 1997 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2, or (at your option) -## any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, write to the Free -## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -## 02110-1301, USA. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{h} =} hbar (@var{x}, @var{y}, @var{style}) -## @deftypefnx {Function File} {[@var{xb}, @var{yb}] =} hbar (@dots{}) -## Given two vectors of x-y data, @code{bar} produces a horizontal bar graph. -## -## If only one argument is given, it is taken as a vector of y-values -## and the x coordinates are taken to be the indices of the elements. -## -## If @var{y} is a matrix, then each column of @var{y} is taken to be a -## separate bar graph plotted on the same graph. By default the columns -## are plotted side-by-side. This behavior can be changed by the @var{style} -## argument, which can take the values 'group' (the default), or 'stack'. -## -## If two output arguments are specified, the data are generated but -## not plotted. For example, -## -## @example -## hbar (x, y); -## @end example -## -## @noindent -## and -## -## @example -## [xb, yb] = hbar (x, y); -## plot (xb, yb); -## @end example -## -## @noindent -## are equivalent. -## @seealso{bar, plot, semilogx, semilogy, loglog, polar, mesh, contour, -## stairs, xlabel, ylabel, title} -## @end deftypefn - -## Author: jwe - -function varargout = hbar (varargin) - varargout = cell (nargout, 1); - [varargout{:}] = __bar__ (false, "hbar", varargin{:}); -endfunction