Mercurial > hg > octave-lyh
annotate scripts/plot/__axis_label__.m @ 8874:bd1b1fe9c6e9 ss-3-1-53
bump version info for snapshot
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 25 Feb 2009 18:35:47 -0500 |
parents | 7d48766c21a5 |
children | eb63fbe60fab |
rev | line source |
---|---|
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 |
8812
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
8557
diff
changeset
|
19 ## -*- texinfo -*- |
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
8557
diff
changeset
|
20 ## @deftypefn {Function File} {} __axis_label__ (@var{caller}, @var{txt}, @dots{}) |
6895 | 21 ## Undocumented internal function. |
8812
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
8557
diff
changeset
|
22 ## @end deftypefn |
3479 | 23 |
24 ## Author: jwe | |
25 | |
6412 | 26 function retval = __axis_label__ (caller, txt, varargin) |
3479 | 27 |
6412 | 28 if (ischar (txt)) |
29 ca = gca (); | |
6737 | 30 |
8557
ab82e19002c4
better compatibility for axis label properties
John W. Eaton <jwe@octave.org>
parents:
8556
diff
changeset
|
31 h = get (gca (), caller); |
ab82e19002c4
better compatibility for axis label properties
John W. Eaton <jwe@octave.org>
parents:
8556
diff
changeset
|
32 |
ab82e19002c4
better compatibility for axis label properties
John W. Eaton <jwe@octave.org>
parents:
8556
diff
changeset
|
33 set (h, "fontangle", get (ca, "fontangle"), |
ab82e19002c4
better compatibility for axis label properties
John W. Eaton <jwe@octave.org>
parents:
8556
diff
changeset
|
34 "fontname", get (ca, "fontname"), |
ab82e19002c4
better compatibility for axis label properties
John W. Eaton <jwe@octave.org>
parents:
8556
diff
changeset
|
35 "fontsize", get (ca, "fontsize"), |
ab82e19002c4
better compatibility for axis label properties
John W. Eaton <jwe@octave.org>
parents:
8556
diff
changeset
|
36 "fontunits", get (ca, "fontunits"), |
ab82e19002c4
better compatibility for axis label properties
John W. Eaton <jwe@octave.org>
parents:
8556
diff
changeset
|
37 "fontweight", get (ca, "fontweight"), |
ab82e19002c4
better compatibility for axis label properties
John W. Eaton <jwe@octave.org>
parents:
8556
diff
changeset
|
38 "string", txt, |
ab82e19002c4
better compatibility for axis label properties
John W. Eaton <jwe@octave.org>
parents:
8556
diff
changeset
|
39 varargin{:}); |
ab82e19002c4
better compatibility for axis label properties
John W. Eaton <jwe@octave.org>
parents:
8556
diff
changeset
|
40 |
6412 | 41 if (nargout > 0) |
42 retval = h; | |
3479 | 43 endif |
44 else | |
7654
48edf48cd4dc
__axis_label__: use name of caller in error message
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
45 error ("%s: expecting first argument to be character string", caller); |
4529 | 46 endif |
47 | |
3479 | 48 endfunction |