Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

text (MathScript RT Module Function)

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

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.

Details

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

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.

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