Home > matutils > gtitle.m

gtitle

PURPOSE ^

function gtitle(str)

SYNOPSIS ^

function h=gtitle(str,y, align)

DESCRIPTION ^

 function gtitle(str)

 Put a global title on the current figure

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function h=gtitle(str,y, align)
0002 % function gtitle(str)
0003 %
0004 % Put a global title on the current figure
0005 
0006 if(~exist('y'))
0007   y=0.96;
0008   align = 1;  %center
0009 end
0010 
0011 axes('Position',[0,0,1,1],'Visible','off')
0012 if(align==1)
0013   h=text(0.5,y,str,'Units','Normalized','FontSize',18,...
0014       'HorizontalAlignment','center');
0015 elseif(align==2)
0016   h=text(0.5,y,str,'Units','Normalized','FontSize',18,...
0017       'HorizontalAlignment','right');
0018 else
0019   h=text(0.5,y,str,'Units','Normalized','FontSize',18,...
0020       'HorizontalAlignment','left');
0021 end
0022 
0023 end

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005