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

Plot Area 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 area attributes to change the appearance of plot area objects in LabVIEW MathScript plots. Plot area objects define the coordinate system the MathScript RT Module uses to display data. A plot window can contain several plot area objects. To create a new plot area object or to return an object for the current plot area, use the following MathScript RT Module functions: axes, ref_plotarea, or subplot.

Details

Examples

Characteristics

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

Attribute NameDescriptionPossible ValuesPermissions
'Color'Specifies the color of the plot area. The default is [1, 1, 1], or white.Color attributeRead/Write
'ColorOrder'Returns the colors used for a plot with multiple lines.Array of color attributesRead Only
'FontAngle'Specifies whether the text in the plot area is italic.
  • 'italic'
  • 'normal' (default)
Read/Write
'FontName'Specifies the font name of the text in the plot area. The default is 'App Font'.StringRead/Write
'FontSize'Specifies the font size of the text in the plot area. The default is 13.IntegerRead/Write
'FontWeight'Specifies whether the text in the plot area is bold.
  • 'bold'
  • 'normal' (default)
Read/Write
'NextPlot'Specifies how to add a new plot to the plot area.
  • 'add'—Adds the new plot to the current plot area. The new plot does not overwrite the existing plot.
  • 'replace' (default)—Replaces the plot in the current plot area. The new plot overwrites the existing plot.
Read/Write
'OuterPosition'Returns the position of the x- and y-axes and their related descriptions, which includes the plot area, the title, and the labels of the axes. The first and second values specify the horizontal and vertical distance from the lower left corner of the plot window to the lower left corner of the plot area. The third and fourth values specify the width and height of the plot area. These values are normalized such that the lower left corner and the upper right corner of the plot window are (0, 0) and (1, 1), respectively.Array of four valuesRead Only
'Position'Returns the position of the plot area. The plot area does not include the title or the labels of the axes. The first and second values specify the horizontal and vertical distance from the lower left corner of the plot window to the lower left corner of the plot area. The third and fourth values specify the width and height of the plot area. These values are normalized such that the lower left corner and the upper right corner of the plot window are (0, 0) and (1, 1), respectively.Array of four valuesRead Only
'Title'Returns the title of the object in the plot area.Text objectRead Only
'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 x- and y-scales.
  • 'off'
  • 'on' (default)
Read/Write
'XColor'Specifies the color of the x-scale. The default is [0, 0, 0].Color attributeRead/Write
'XDir'Specifies whether to reverse the minimum and maximum values of the x-scale.
  • 'normal' (default)
  • 'reverse'
Read/Write
'XGrid'Specifies whether to display the grid for the x-scale.
  • 'off' (default)
  • 'on'
Read/Write
'XLabel'Returns the label of the x-axis.Text objectRead Only
'XLim'Specifies the range of the x-scale. The first and second values specify the minimum and maximum values, respectively. The default is [0, 10].Array of two valuesRead/Write
'XLimMode'Specifies whether to fit the x-scale automatically to the data.
  • 'auto' (default)
  • 'manual'
Read/Write
'XMinorGrid'Specifies whether to display the minor grid for the x-scale.
  • 'off' (default)
  • 'on'
Read/Write
'XMinorTick'Specifies whether to display the minor tick for the x-scale.
  • 'off' (default)
  • 'on'
Read/Write
'XScale'Specifies the mapping mode for the x-scale.
  • 'linear' (default)
  • 'log'
Read/Write
'XTick'Specifies the values of the x-scale markers. The default is an empty array.ArrayRead/Write
'XTickMode'Specifies whether to adjust the x-scale markers automatically to reflect the data in the plot.
  • 'auto' (default)
  • 'manual'
Read/Write
'YColor'Specifies the color of the y-scale. The default is [0, 0, 0].Color attributeRead/Write
'YDir'Specifies whether to reverse the minimum and maximum values of the y-scale.
  • 'normal' (default)
  • 'reverse'
Read/Write
'YGrid'Specifies whether to display the grid for the y-scale.
  • 'off' (default)
  • 'on'
Read/Write
'YLabel'Returns the label of the y-axis.Text objectRead Only
'YLim'Specifies the range of the y-scale. The first and second values specify the minimum and maximum values, respectively. The default is [0, 10].Array of two valuesRead/Write
'YLimMode'Specifies whether to fit the y-scale automatically to the data.
  • 'auto' (default)
  • 'manual'
Read/Write
'YMinorGrid'Specifies whether to display the minor grid for the y-scale.
  • 'off' (default)
  • 'on'
Read/Write
'YMinorTick'Specifies whether to display the minor tick for the y-scale.
  • 'off' (default)
  • 'on'
Read/Write
'YScale'Specifies the mapping mode for the y-scale.
  • 'linear' (default)
  • 'log'
Read/Write
'YTick'Specifies the values of the y-scale markers. The default is an empty array.ArrayRead/Write
'YTickMode'Specifies whether to adjust the y-scale markers automatically to reflect the data in the plot.
  • 'auto' (default)
  • 'manual'
Read/Write

The following table lists the MathScript RT Module plot area attributes that are ignored when specified.

Attribute NameDescriptionPossible ValuesPermissions
'DrawMode'Specifies the way of rendering the plot area.
  • 'normal' (default)
  • 'fast'
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

X = sin(0:0.1:100);
plot(X, 'Color', 'g')
Y = axes;
set (Y, 'YLim', [-5, 5], 'XLim', [0, 600], 'NextPlot', 'add')
X = [0:60:600];
Y = [-5:5];
plot(X, Y)

obj = subplot(212);
set(obj, 'Color', 'c', 'XColor', 'm', 'YColor', 'm')
a = subplot(211);
set(a, 'Color', 'm', 'XColor', 'c', 'YColor', 'c')

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);


 

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