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

line (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the plots class.

Syntax

line(x, y)

line(x, y, z)

line(x, y, name1, value1, ..., nameN, valueN)

obj = line(x, y)

obj = line(x, y, name1, value1, ..., nameN, valueN)

Description

Adds a line to the current plot. line(x, y, name1, value1, ..., nameN, valueN) sets the line attributes according to the attribute names and values you specify.

Details

Examples

Inputs

Name Description
x Specifies the x-coordinates of the line you want to plot. x is a vector or matrix. If x is a matrix, line plots each column of x as a separate line.
y Specifies the y-coordinates of the line you want to plot. y is a vector or matrix. size(y) must equal size(x).
z Specifies the z-coordinates of the line you want to plot. z is a vector or matrix. size(z) must equal size(x).
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 line LabVIEW creates. obj is a reference to a line 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 = -pi:pi;
y = sin(x);
line(x, y)

a = -pi:pi;
b = sin(a);
obj = line(a, b, 'Color', 'm', 'LineStyle', ':', 'LineWidth', 4)

Related Topics

plot
sin


Resources


 

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