Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Plot Window Attributes (MathScript RT Module)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Use the MathScript RT Module plot window attributes to change the appearance of plot window objects in LabVIEW MathScript plots. Plot window objects are the objects that comprise the plot window, including a menu bar, a shortcut menu, and plot areas. To create a new plot window object or to return an object for the current plot window, use the following MathScript RT Module functions: clfig, figure, or ref_plotwin.

Details

Examples

Characteristics

The following table lists the MathScript RT Module plot window attributes and their characteristics.

Attribute NameDescriptionPossible ValuesPermissions
'Color' Specifies the color of the plot window. The default is the system default color. Color attribute Read/Write
'CurrentAxes' Returns the object for the current plot area in the plot window. Plot area object Read Only
'Name' Specifies the string that appears in the title bar of the plot window. The default is an empty string. String Read/Write
'NextPlot' Specifies how to add a new plot to the plot window.
  • 'add'—Adds the new plot to the current plot window.
  • 'new'—Generates the new plot in a new plot window.
  • 'replace' (default)—Replaces the plot in the current plot window. The new plot overwrites the existing plot.
Read/Write
'NumberTitle'Specifies whether to display the plot number in the title bar of the plot window.
  • 'off'
  • 'on' (default)
Read/Write
'Position'Specifies the position of the plot window. The first and second values specify the horizontal and vertical distance from the lower left corner of the screen to the lower left corner of the plot window. The third and fourth values specify the width and height of the plot window. The position is specified in pixels. The default is an empty array.Array of four valuesRead/Write
'Resize'Specifies whether you can resize the plot window.
  • 'off'
  • 'on' (default)
Read/Write
'Type'Returns the type of the object. Possible types include line, plot area, plot window, and text objects.StringRead Only
'Visible'Specifies whether to display the plot window.
  • 'off'
  • 'on' (default)
Read/Write

Details

Use an RGB triple or a string to specify a valid color attribute. An RGB triple is an array of three values that specify the intensities of the red, green, and blue components of the color. Each element in the array must fall in the range [0, 1]. If you specify a string, the color attribute accepts the following values.

'b'Blue
'c'Cyan
'g'Green
'k'Black
'm'Magenta
'r'Red
'w'White
'y'Yellow

Examples

obj = figure;
set(obj, 'Color', 'g', 'Name', 'My MathScript Plot', 'NumberTitle', 'off')

obj = figure('Color', 'c')
X = [0:0.1:10];
Y = sin(X);
plot(Y)

obj = figure;
A = 0:.1:50;
B = cos(A);
plot(B)
set(obj, 'NextPlot', 'new')
X = [0:0.01:1];
Y = X.*X;
plot(X, Y, 'rx-')

t = 0:0.1:2*pi;
obj1 = figure('Position', [10, 100, 500, 400]);
plot(t, sin(t));
obj2 = figure;
plot(t, cos(t));
p = get(obj1, 'Position');
set(obj2, 'Position', [p(1) + p(3), p(2), p(3), p(4)]);


 

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