MATLAB Function Reference
  Go to function:
    Search    Help Desk 
title    Examples   See Also

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:

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 ]