title

Sets the title of the plot.

Syntax

h = title(str)

h = title(hAxes, str)

h = title(..., property, value, ...)

Inputs

str
Text to be set as title.
Type: string | cell
Dimension: scalar
hAxes
Axis handle.
Type: double
Dimension: scalar
property
Properties that control the appearance or behavior of the graphics object.
Type: string
Dimension: scalar
value
Value of the properties.
Type: double | integer | string
Dimension: scalar

Outputs

h
Handle of the title graphics object.

Examples

Simple title example:
clf;
h = title('empty axes with title');


Figure 1. Simple title example
Cell input title example:
clf;
h = title({'empty axes', 'with multi-line title'});


Figure 2. Cell input title example
Optional arguments example:
clf;
h = title('empty axis', 'color', [50 100 250], 'fontangle', 'italic');


Figure 3. Optional arguments in title command