subtitle(text)
subtitle(target, text)
subtitle(..., propertyName, propertyValue)
go = subtitle(...)
| Parameter | Description |
|---|---|
| text | Text to display: character vector, string scalar, string array, or cell array of character vectors. |
| target | An axes or tiled layout graphics object, or an array of objects of the same supported class. |
| propertyName | Subtitle object property name. |
| propertyValue | Subtitle object property value. |
| Parameter | Description |
|---|---|
| go | A subtitle graphics object, or an array of subtitle graphics objects. |
subtitle adds the subtitle to the current axes or to the specified target.
When the target already has a subtitle text object, subtitle updates and returns that object.
For axes targets, the subtitle text uses data units and follows the axes title horizontal alignment.
For tiled layout targets, the returned object exposes the tiled layout text properties.
String arrays and cell arrays of character vectors are stored as multiple subtitle lines.
Property name and value pairs are applied to the subtitle object.
The Visible property is inherited from the parent axes when a new subtitle text object is created.
f = figure();
plot([0 2], [1 5]);
title('Straight Line');
subtitle('Slope = 2, y-Intercept = 1');
f = figure();
plot([0 2], [1 5]);
title('Straight Line');
subtitle('Slope = 2, y-Intercept = 1', 'Color', 'red');
| Version | Description |
|---|---|
| 2.0.0 | initial version |