Add title to current Axes
Syntax
title('string
')
title(fname)
title(...,'PropertyName
',PropertyValue,...)
h = title(...)
Description
Each Axes graphics object can have one title. The title is located at the top and in the center of the axes.
title('string
')
outputs the string at the top and in the center of the current axes.
title(fname)
evaluates the function that returns a string and displays the string at the top and in the center of the current axes.
title(...,'PropertyName
',PropertyValue,...)
specifies property name and property value pairs for the Text graphics object that title
creates.
h = title(...)
returns the handle to the text object used as the title.
Examples
Display today's date in the current Axes:
title(date)
Include a variable's value in a title:
f = 70;
c = (f--32)/1.8;
title(['Temperature is ',num2str(c),'C'])
Include a variable's value in a title and set the color of the title to yellow:
n = 3;
title(['Case number #',int2str(n)],'Color','y')
Include Greek symbols in a title:
title('\ite^{\omega\tau} = cos(\omega\tau) + isin(\omega\tau)')
The Text object String
property lists the available symbols.
Remarks
title
sets the Title
property of the current Axes graphics object to a new Text
graphics object. See the Text String
property for more information.
See Also
gtext
, int2str
, num2str
, plot
, text
, xlabel
, ylabel
, zlabel
[ Previous | Help Desk | Next ]