1
## Copyright (C) 1996, 1997, 2006, 2007 John W. Eaton
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/>.
19
## Undocumented internal function.
23
function [h, varargin, narg] = __plt_get_axis_arg__ (caller, varargin)
25
if (islogical (caller))
33
## Figure handles are integers, but object handles are non integer,
34
## therefore ignore integer scalars.
35
if (nargin > 1 && length (varargin) > 0 && ishandle (varargin{1})
36
&& floor(varargin{1}) != varargin{1})
39
if (strcmp (obj.type, "axes") || strcmp (obj.type, "hggroup"))
40
h = ancestor (tmp, "axes");
42
if (isempty (varargin))
46
error ("%s: expecting first argument to be axes handle", caller);
49
f = get (0, "currentfigure");
53
h = get (f, "currentaxes");
67
narg = length (varargin);