Back to Data Visualization
text
Add text annotation
Syntax
text(x, y, str)
Description
Adds a text annotation at the specified (x, y) coordinates in data units.
Parameters
| Name | Description |
|---|---|
| x | X-coordinate |
| y | Y-coordinate |
| str | Text string |
Returns
null
Examples
Try It
>> plot([1 2 3]); text(2, 2.5, 'Peak')