MATLAB Function Reference    
title

Add title to current axes

Syntax

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:

Include a variable's value in a title:

Include a variable's value in a title and set the color of the title to yellow:

Include Greek symbols in a title:

Include a superscript character in a title:

Include a subscript character in a title:

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, text, xlabel, ylabel, zlabel

Annotating Plots for related functions

Adding Titles to Graphs for more information on ways to add titles.


  timerfind toeplitz