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 |
5307
|
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
18 ## 02110-1301, USA. |
3479
|
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 |
6412
|
27 function retval = __axis_label__ (caller, txt, varargin) |
3479
|
28 |
6412
|
29 if (ischar (txt)) |
|
30 ## FIXME -- should be able to use text instead of __go_text__. |
|
31 ca = gca (); |
6737
|
32 |
|
33 if (strcmp (caller, "ylabel")) |
|
34 rot = 90; |
|
35 else |
|
36 rot = 0; |
|
37 endif |
|
38 |
|
39 h = __go_text__ (ca, "string", txt, "rotation", rot, varargin{:}); |
6412
|
40 set (ca, caller, h); |
|
41 if (nargout > 0) |
|
42 retval = h; |
3479
|
43 endif |
|
44 else |
6412
|
45 error ("%s: expecting first argument to be character string"); |
4529
|
46 endif |
|
47 |
3479
|
48 endfunction |