Mercurial > hg > octave-nkf
diff scripts/plot/__axis_label__.m @ 6412:b2096bb759b1
[project @ 2007-03-15 02:33:45 by jwe]
author | jwe |
---|---|
date | Thu, 15 Mar 2007 02:36:10 +0000 |
parents | b298a4c12fc3 |
children | 7888712d3532 |
line wrap: on
line diff
--- a/scripts/plot/__axis_label__.m +++ b/scripts/plot/__axis_label__.m @@ -24,22 +24,18 @@ ## Author: jwe -function retval = __axis_label__ (caller, txt) - - ## If we have an even number of arguments, they should be - ## property-value pirs. +function retval = __axis_label__ (caller, txt, varargin) - if (nargin == 2) - if (ischar (txt)) - ca = gca (); - ## FIXME -- should be able to use text instead of __go_text__. - set (ca, caller, __go_text__ (ca, "string", txt)); - if (nargout > 0) - retval = get (ca, caller); - endif + if (ischar (txt)) + ## FIXME -- should be able to use text instead of __go_text__. + ca = gca (); + h = __go_text__ (ca, "string", txt, varargin{:}); + set (ca, caller, h); + if (nargout > 0) + retval = h; endif else - print_usage (); + error ("%s: expecting first argument to be character string"); endif endfunction