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

Text 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 text attributes to change the appearance of text objects in LabVIEW MathScript plots. Text objects include text strings, scale labels, and the plot title. To create and return a new text object, use the following MathScript RT Module functions: text, title, xlabel, or ylabel.

Details

Examples

Characteristics

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

Attribute NameDescriptionPossible ValuesPermissions
'BackgroundColor'Specifies the background color of the text area. The default is no background color.Color attributeRead/Write
'Color'Specifies the color of the text. The default is [0, 0, 0].Color attributeRead/Write
'EdgeColor'Specifies the color of the border for the text area. The default is no border color.Color attributeRead/Write
'FontAngle'Specifies whether the text is italic.
  • 'italic'
  • 'normal' (default)
Read/Write
'FontName'Specifies the font name of the text. The default is 'App Font'.StringRead/Write
'FontSize'Specifies the font size of the text. The default is 13.IntegerRead/Write
'FontWeight'Specifies whether the text is bold.
  • 'bold'
  • 'normal' (default)
Read/Write
'HorizontalAlignment'Specifies the horizontal alignment of the text.
  • 'center'
  • 'left' (default)
  • 'right'
Read/Write
'Position'Specifies the position of the text. The first and second values specify the x- and y-coordinates of the text. The default is an empty array.Array of two valuesRead/Write
'String'Specifies the text string. The default is an empty string.StringRead/Write
'Type'Returns the type of object. Possible types include line, plot area, plot window, and text objects.StringRead Only
'VerticalAlignment'Specifies the vertical alignment of the text.
  • 'baseline'—Aligns the bottom of the text with the y-coordinate position.
  • 'bottom'—Aligns the bottom of the frame around the text with the y-coordinate position.
  • 'cap'—Aligns the top of the text with the y-coordinate position.
  • 'middle' (default)—Aligns the middle of the text with the y-coordinate position.
  • 'top'—Aligns the top of the frame around the text with the y-coordinate position.
Read/Write
'Visible'Specifies whether to display the text.
  • '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

t = 0:0.1:2*pi;
plot(t, sin(t));
obj = title('sin(t)', 'FontSize', 16);
xlabel('t');
ylabel('sin(t)');
s = get(obj, 'FontSize');
set(get(ref_plotarea, 'XLabel'), 'FontSize', s);
set(get(ref_plotarea, 'YLabel'), 'FontSize', s);


 

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