3479
|
1 ## Copyright (C) 1996, 1997 John W. Eaton |
|
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 |
|
7 ## the Free Software Foundation; either version 2, or (at your option) |
|
8 ## any later version. |
|
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 |
|
16 ## along with Octave; see the file COPYING. If not, write to the Free |
|
17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
|
18 ## 02111-1307, USA. |
|
19 |
|
20 ## -*- texinfo -*- |
3497
|
21 ## @deftypefn {Function File} {} __axis_label__ (@var{caller}, @var{text}) |
3479
|
22 ## Utility function for @code{xlabel}, @code{ylabel}, and @code{zlabel}. |
|
23 ## @end deftypefn |
|
24 |
|
25 ## Author: jwe |
|
26 |
4529
|
27 function h = __axis_label__ (caller, text) |
3479
|
28 |
|
29 if (nargin == 0) |
|
30 usage ("__axis_label__ (caller, text)"); |
|
31 elseif (nargin == 2) |
|
32 if (isstr (text)) |
|
33 eval (sprintf ("gset %s \"%s\"", caller, |
|
34 undo_string_escapes (undo_string_escapes (text)))); |
|
35 else |
|
36 error ("%s: text must be a string", caller); |
|
37 endif |
|
38 else |
|
39 usage ("%s (text)", caller); |
|
40 endif |
|
41 |
4529
|
42 ## XXX FIXME XXX -- eventually, we will return a graphics handle. For |
|
43 ## now, return something, so that calls that expect a handle won't |
|
44 ## fail (at least immediately). |
|
45 |
|
46 if (nargout > 0) |
|
47 h = -1; |
|
48 endif |
|
49 |
3479
|
50 endfunction |