Object Reference : Object View and Procedure Reference : Graph
  
 
drawdefault
Change default settings for lines and shaded areas in the graph.
This command specifies changes in the default settings which will be applied to line and shade objects added subsequently to the graph. If you include the “existing” option, all of the drawing default settings will also be applied to existing line and shade objects in the graph.
Syntax
graph_name.drawdefault draw_options
where draw_options may include one or more of the following:
 
linecolor(arg)
Sets the default color for lines. 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 full description of the keywords, see “Color definitions”.
shadecolor(arg)
Sets the default color for shades. 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 full description of the keywords, see “Color definitions”
width(n1)
Specify the width, where n1 is the line width in points (used only if object_type is “line” or “dashline”). The default is 0.5 points.
pattern(index)
Sets the default line pattern to the type specified by index. index can be an integer from 1 to 12 or one of the matching keywords (“solid”, “dash1” through “dash10”, “none”). Sets the line pattern to the type specified by index. index can be an integer from 1 to 12 or one of the matching keywords (“solid”, “dash1” through “dash10”, “none”).
The “none” keyword turns on solid lines.
existing
Apply the default settings to all existing line/shade objects in the graph.
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.drawdefault linecolor(blue) width(.25) existing
changes the default setting for new line/shade objects. New lines added to the graph will now be drawn in blue, with a width of 0.25 points. In addition, all existing line and shade objects will be updated with the graph default settings. Note that in addition to the line color and width settings specified in the command, the existing default line pattern and shade colors will be applied to the line and shade objects in graph.
graph1.drawdefault existing
updates all line and shade objects in the graph with the currently specified default draw object settings.
Cross-references
See “Graph Objects” for a discussion of graph options.
See Graph::draw.