Mercurial > hg > octave-lyh
diff scripts/plot/title.m @ 8554:8cd2277569c0
title.m: set horizontalalignment to center
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 21 Jan 2009 11:40:37 -0500 |
parents | c18512d0ddb6 |
children | 821c0a7efbee |
line wrap: on
line diff
--- a/scripts/plot/title.m +++ b/scripts/plot/title.m @@ -19,6 +19,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} title (@var{title}) +## @deftypefnx {Function File} {} title (@var{title}, @var{p1}, @var{v1}, @dots{}) ## Create a title object and return a handle to it. ## @end deftypefn @@ -26,13 +27,14 @@ ## Author: jwe -function h = title (varargin) +function h = title (s, varargin) if (rem (nargin, 2) == 1) + varargin = [{"horizontalalignment", "center"}, varargin] if (nargout > 0) - h = __axis_label__ ("title", varargin{:}); + h = __axis_label__ ("title", s, varargin{:}); else - __axis_label__ ("title", varargin{:}); + __axis_label__ ("title", s, varargin{:}); endif else print_usage ();