Mercurial > hg > octave-nkf
changeset 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 | c7ff200e45f5 |
children | 821c0a7efbee |
files | scripts/ChangeLog scripts/plot/title.m |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-01-21 John W. Eaton <jwe@octave.org> + + * plot/title.m: Insert horizontalalignment property in varargin + before passing it on to __axis_label__. + 2009-01-21 Jaroslav Hajek <highegg@gmail.com> * strings/strchr.m: New function.
--- 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 ();