![]() | Download Help (Windows Only) |
Owning Class: plots
Requires: MathScript RT Module
set(obj)
set(obj, name)
set(obj, name1, value1, ..., nameN, valueN)
a = set(obj)
b = set(obj, name)
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.
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. |
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. |
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 | Yes |
Suitable for bounded execution times on RT | Not characterized |
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
Helpful
Not Helpful