Mercurial > hg > octave-lyh
annotate scripts/plot/private/__axis_label__.m @ 11523:fd0a3ac60b0e
update copyright notices
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 14 Jan 2011 05:47:45 -0500 |
parents | 6154672afa9a |
children | c792872f8942 |
rev | line source |
---|---|
11523 | 1 ## Copyright (C) 1996-2011 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, |
10549 | 39 varargin{:}); |
11408
6154672afa9a
Trigger fltk graphics redraw immediately after setting an axis label.
Konstantinos Poulios <logari81@googlemail.com>
parents:
10549
diff
changeset
|
40 __fltk_redraw__() |
8557
ab82e19002c4
better compatibility for axis label properties
John W. Eaton <jwe@octave.org>
parents:
8556
diff
changeset
|
41 |
6412 | 42 if (nargout > 0) |
43 retval = h; | |
3479 | 44 endif |
45 else | |
7654
48edf48cd4dc
__axis_label__: use name of caller in error message
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
46 error ("%s: expecting first argument to be character string", caller); |
4529 | 47 endif |
48 | |
3479 | 49 endfunction |