Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

text (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: plots

Requires: MathScript RT Module

Syntax

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)

Description

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.

Examples

Inputs

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.

Outputs

Name Description
obj Returns the reference to the text LabVIEW creates. obj is a reference to a text object.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine No (returns error or is ignored)
Supported on RT targets No

Examples

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')

Related Topics

plot
xlabel
ylabel
zlabel


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit