Object Reference : Object View and Procedure Reference : Graph
  
 
textdefault
Change default settings for text objects in the graph.
This command specifies changes in the default settings which will be applied to text objects added subsequently to the graph. If you include the “existing” option, all of the text default settings will also be applied to existing text objects in the graph.
Syntax
graph_name.textdefault text_options
where text_options include one or more of one of the following:
 
font([face], [pt], [+/- b], [+/- i], [+/- u], [+/- s])
Set characteristics of default text font. The font name (face), size (pt), and characteristics are all optional. face should be a valid font name, enclosed in double quotes. pt. should be the font size in points. The remaining options specify whether to turn on/off boldface (b), italic (i), underline (u), and strikeout (s) styles.
textcolor(arg)
Sets the default color of the text. arg may be one of the predefined color keywords, or it may be specified using individual red-green-blue (RGB) components using the “@RGB” or “@HEX” functions. The arguments to the @RGB function are a set of three integers from 0 to 255, representing the RGB values of the color. The arguments to the “@HEX” function are a set of six characters representing the RGB values of the color in hexadecimal. Each two character set represents a red, green or blue component in the range '00' to 'FF'. For a description of the available color keywords see “Color definitions”.
fillcolor(arg)
Sets the default background fill color of the text box. arg may be one of the predefined color keywords, or it may be specified using individual red-green-blue (RGB) components using the “@RGB” or “@HEX” functions. The arguments to the @RGB function are a set of three integers from 0 to 255, representing the RGB values of the color. The arguments to the “@HEX” function are a set of six characters representing the RGB values of the color in hexadecimal. Each two character set represents a red, green or blue component in the range '00' to 'FF'. For a description of the available color keywords see “Color definitions”.
framecolor(arg)
Sets the default color of the text box frame. arg may be one of the predefined color keywords, or it may be specified using individual red-green-blue (RGB) components using the “@RGB” or “@HEX” functions. The arguments to the @RGB function are a set of three integers from 0 to 255, representing the RGB values of the color. The arguments to the “@HEX” function are a set of six characters representing the RGB values of the color in hexadecimal. Each two character set represents a red, green or blue component in the range '00' to 'FF'. For a description of the available color keywords see “Color definitions”.
existing
Apply the default settings to all existing text objects in the graph.
The options which support the “–” may be preceded by a “+” or “–” indicating whether to turn on or off the option. The “+” is optional.
Color definitions
color_arg specifies the color to be employed in the arguments above. The color may be specified using predefined color names, by specifying the individual red-green-blue (RGB) components using the special “@RGB” function, or by specifying the individual red-green-blue (RGB) components in hexadecimal using the special “@HEX” function.
The predefined colors are given by the keywords (with their RGB and HEX equivalents):
 
blue
@rgb(0, 0, 255)
@hex(0000ff)
red
@rgb(255, 0, 0)
@hex(ff0000)
ltred
@rgb(255, 168, 168)
@hex(ffa8a8)
green
@rgb(0, 128, 0)
@hex(008000)
black
@rgb(0, 0, 0)
@hex(000000)
white
@rgb(255, 255, 255)
@hex(ffffff)
purple
@rgb(128, 0, 128)
@hex(800080)
orange
@rgb(255, 128, 0)
@hex(ff8000)
yellow
@rgb(255, 255, 0)
@hex(ffff00)
gray
@rgb(128, 128, 128)
@hex(808080)
ltgray
@rgb(192, 192, 192)
@hex(c0c0c0)
Examples
graph1.textdefault font("Arial", b) fillcolor(gray) framecolor(@rgb(0,0,255)) existing
changes the default text settings for new text objects so that new text is in Arial bold, using the current default font size and color. Should the new text be enclosed in a box, the box will have a gray fill and blue frame color. Additionally, the “existing” keyword specifies that existing text objects in the graph will be updated with the current text settings. Note that in addition to the font type and fill color specified in the command, all text default settings will be applied to the existing text.
graph1.textdefault existing
updates the text objects in GRAPH1 with the current text default settings.
Cross-references
See “Graph Objects” for a discussion of graph options.
See Graph::addtext and Graph::legend.