7017
|
1 ## Copyright (C) 1996, 1997, 2006, 2007 John W. Eaton |
6257
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
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 |
7016
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
|
8 ## your option) any later version. |
6257
|
9 ## |
|
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. |
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
7016
|
16 ## along with Octave; see the file COPYING. If not, see |
|
17 ## <http://www.gnu.org/licenses/>. |
6257
|
18 |
6895
|
19 ## Undocumented internal function. |
6257
|
20 |
|
21 ## Author: jwe |
|
22 |
|
23 function [h, varargin] = __plt_get_axis_arg__ (caller, varargin) |
|
24 |
6925
|
25 if (nargin > 1 && length (varargin) > 0 && ishandle (varargin{1})) |
6257
|
26 tmp = varargin{1}; |
6925
|
27 obj = get (tmp); |
|
28 if (strcmp (obj.type, "axes")) |
|
29 h = tmp; |
|
30 varargin(1) = []; |
|
31 if (isempty (varargin)) |
|
32 varargin = {}; |
6257
|
33 endif |
|
34 else |
6925
|
35 error ("%s: expecting first argument to be axes handle", caller); |
6257
|
36 endif |
6925
|
37 else |
|
38 h = gca (); |
6927
|
39 if (nargin < 2) |
|
40 varargin = {}; |
|
41 endif |
6257
|
42 endif |
|
43 |
|
44 endfunction |