Member of the plots class.
get(obj)
get(obj, name)
get(0, default)
a = get(obj)
b = get(obj, name)
b = get(0, default)
Returns the attribute value of a plot object. Plot objects include line, plot area, plot window, and text objects. get(obj) returns the current values of all attributes of the plot object referenced by obj. get(obj, name) returns the current value of the attribute specified by name. get(0, default) returns the default value of the attribute specified by default.
| Name | Description |
| obj | Specifies the reference to the plot object. |
| name | Specifies the name of the attribute. name is a string. |
| default | Specifies the name of the attribute for which you want LabVIEW to return the default value. default is a string and must be the concatenation of 'Default', object type, and attribute name, such as 'DefaultPlotWindowResize'. Valid objects types are Line, PlotArea, PlotWindow, and Text. |
| Name | Description |
| a | Returns the names and current values of all attributes of the plot object referenced by obj. a is a string. |
| b | Returns the value of the specified attribute. |
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.
t = 0:0.1:2*pi;
obj1 = subplot(211);
plot(t, sin(t));
set(obj1, 'Color', rand(3, 1));
obj2 = subplot(212);
plot(t, cos(t));
c = get(obj1, 'Color');
set(obj2, 'Color', 1 - c);
b = get(0, 'DefaultLineVisible')