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

set (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

set(obj)

set(obj, name)

set(obj, name1, value1, ..., nameN, valueN)

a = set(obj)

b = set(obj, name)

Description

Sets the attribute value of a plot object. Plot objects include line, plot area, plot window, and text objects. set(obj, name1, value1, ..., nameN, valueN) sets the attribute values you specify for the plot object referenced by obj. If you do not specify an attribute name and value, LabVIEW returns all attributes and possible values for the plot object referenced by obj. If you do not specify an attribute value, LabVIEW returns all possible values of the attribute specified by name.

Details

Examples

Inputs

Name Description
obj Specifies the reference to the plot object.
name Specifies the name of the attribute. name is a string.
value Specifies the value of the attribute.

Outputs

Name Description
a Returns the names and possible values of the attributes. a is a string.
b Returns the possible values of the specified attribute.

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:0.01:1];
Y = X.*X;
obj = plot(X, Y);
set(obj, 'Color', 'b', 'LineStyle', '--');

obj = axes;
b = set(obj, 'NextPlot')

t = 0:0.1:2*pi;
obj = plot(t(1), sin(t(1)));
hold on
obj1 = plot(t(1), sin(t(1)), 'ro');
axis([0, 2*pi, -1, 1])
for i = 2:length(t);
     xx = get(obj, 'XData');
     yy = get(obj, 'YData');
     set(obj, 'XData', [xx, t(i)], 'YData', [yy, sin(t(i))]);
     set(obj1, 'XData', t(i), 'YData', sin(t(i)));
end

Related Topics

axes
get
plot
ref_plotarea
ref_plotwin


 

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