line (MathScript RT Module Function)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012

产品编号:373123C-0118

»查看产品信息
下载帮助
(仅限Windows)

Owning Class: plots

Requires: MathScript RT Module

Syntax

line(x, y)

line(x, y, z)

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

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

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

obj = line(x, y)

obj = line(x, y, z)

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

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

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

Description

Adds a line to the current plot. line(x, y, name1, value1, ..., nameN, valueN) or line(x, y, z, name1, value1, ..., nameN, valueN) sets the line attributes according to the attribute names and values you specify. When calling line(name1, value1, ..., nameN, valueN), you must use the attributes 'XData', 'YData', or 'ZData' to specify the x-, y-, or z-coordinates of the line.

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

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 = -pi:pi;
y = sin(x);
line(x, y)

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

Related Topics

plot
sin

文章是否对您有帮助?

没有帮助