7017
|
1 ## Copyright (C) 1996, 1997, 2000, 2003, 2005, 2006, 2007 John W. Eaton |
3479
|
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. |
3479
|
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/>. |
3479
|
18 |
6895
|
19 ## Undocumented internal function. |
3479
|
20 |
|
21 ## Author: jwe |
|
22 |
6412
|
23 function retval = __axis_label__ (caller, txt, varargin) |
3479
|
24 |
6412
|
25 if (ischar (txt)) |
|
26 ## FIXME -- should be able to use text instead of __go_text__. |
|
27 ca = gca (); |
6737
|
28 |
|
29 if (strcmp (caller, "ylabel")) |
|
30 rot = 90; |
|
31 else |
|
32 rot = 0; |
|
33 endif |
|
34 |
|
35 h = __go_text__ (ca, "string", txt, "rotation", rot, varargin{:}); |
6412
|
36 set (ca, caller, h); |
|
37 if (nargout > 0) |
|
38 retval = h; |
3479
|
39 endif |
|
40 else |
6412
|
41 error ("%s: expecting first argument to be character string"); |
4529
|
42 endif |
|
43 |
3479
|
44 endfunction |