Member of the plots class.
text(x, y, plottext)
text(x, y, plottext, 'sc')
text(x, y, plottext, name1, value1, ..., nameN, valueN)
text(x, y, plottext, 'sc', name1, value1, ..., nameN, valueN)
obj = text(x, y, plottext)
obj = text(x, y, plottext, 'sc')
obj = text(x, y, plottext, name1, value1, ..., nameN, valueN)
obj = text(x, y, plottext, 'sc', name1, value1, ..., nameN, valueN)
Adds text to the current plot area. text(x, y, plottext, name1, value1, ..., nameN, valueN) sets the text attributes according to the attribute names and values you specify.
| Name | Description |
| x | Specifies the x-coordinate at which you want to add text. x is a scalar. |
| y | Specifies the y-coordinate at which you want to add text. y is a scalar. |
| plottext | Specifies the text you want to add. plottext is a string. |
| 'sc' | Interprets x and y as relative coordinates, where (0, 0) is the lower-left corner and (1, 1) is the upper-right corner of the current plot. If you specify 'sc', x and y must be greater than 0 and less than 1. |
| name | Specifies the name of the attribute. name is a string. |
| value | Specifies the value of the attribute. |
| Name | Description |
| obj | Returns the reference to the text LabVIEW creates. obj is a reference to a text object. |
This function is not supported in the LabVIEW Run-Time Engine if you request an output from the function. Either do not request an output or remove this function from scripts before you build a stand-alone application or shared library.
X = 0:1:10;
Y = X.*X;
plot(Y)
text(3, 70, 'Hello')
text(0.8, 0.2, 'Hello again', 'sc')
X = 0:1:10;
Y = X.*X;
plot(Y)
text(3, 70, 'Hello', 'EdgeColor', 'm')
obj = text(0.8, 0.2, 'Hello again', 'sc', 'BackgroundColor', 'c')