MATLAB Functions Help Desk

title

Purpose

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:

Algorithm

title sets the Title property of the current Axes graphics object to a new Text graphics object.

See Also

gtext, int2str, num2str, plot, text, xlabel, ylabel, zlabel



[ Previous | Help Desk | Next ]