Documentation of title2

Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)

Function Synopsis

hh = title2(string, varargin)

Help text

 title2  Graph Title on upper right corner

 title2('text') sets the title in the upper right corner of the
 grid box, and assigns a fontsize of 9 to the title.

Cross-Reference Information

This function is called by

Listing of function title2

function hh = title2(string, varargin)
ax = gca;
h = get(ax,'title');

if nargin > 1 & (nargin-1)/2-fix((nargin-1)/2),
  error('Incorrect number of input arguments')

%Over-ride text objects default font attributes with
%the Axes' default font attributes.
set(h, 'FontAngle',  get(ax, 'FontAngle'), ...
       'FontName',   get(ax, 'FontName'), ...
       'FontSize',   get(ax, 'FontSize'), ...
       'FontWeight', get(ax, 'FontWeight'), ...
       'Rotation',   0, ...
       'string',     string);
set(h, 'units', 'normal');
pos = get(h, 'Position'); pos(1) = 0;
%pos(2) = pos(2)-0.03;
set(h, 'Position', pos, 'HorizontalAlignment', 'left', ...
       'fontsize', 9);

if nargin > 1;
  set(h, varargin{:});

if nargout > 0
  hh = h;