1 ## Copyright (C) 2007-2012 David Bateman
3 ## This file is part of Octave.
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 3 of the License, or (at
8 ## your option) any later version.
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.
15 ## You should have received a copy of the GNU General Public License
16 ## along with Octave; see the file COPYING. If not, see
17 ## <http://www.gnu.org/licenses/>.
20 ## @deftypefn {Function File} {} __axes_limits__ (@var{fcn}, @dots{})
21 ## Undocumented internal function.
24 function retval = __axes_limits__ (fcn, varargin)
28 fcnmode = sprintf ("%smode", fcn);
30 [h, varargin, nargin] = __plt_get_axis_arg__ (fcn, varargin{:});
33 retval = get (h, fcn);
38 if (strcmpi (arg, "mode"))
39 retval = get (h, fcnmode);
40 elseif (strcmpi (arg, "auto") || strcmpi (arg, "manual"))
41 set (h, fcnmode, arg);
44 if (!isnumeric (arg) && any (size(arg(:)) != [2, 1]))
45 error ("%s: argument must be a 2 element vector", fcn);
48 error ("%s: axis limits must be increasing", fcn);