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. The arg value may set by using one of the color keywords (e.g., “blue”), or by using the RGB values (e.g., “@RGB(255, 255, 0)”). For a description of the available color keywords (“blue”, “red”, “green”, “black”, “white”, “purple”, “orange”, “yellow”, “gray”, “ltgray”). For a full description of the keywords, see Table::setfillcolor.
shadecolor(arg)
Sets the default color for shades. arg may be one of the predefined color keywords, or it may be made up of n1, n2, n3, a set of three integers from 0 to 255, representing the RGB values of the color. For a description of the available color keywords (“blue”, “red”, “green”, “black”, “white”, “purple”, “orange”, “yellow”, “gray”, “ltgray”), see Table::setfillcolor.
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”). See Graph::setelem for a description of the available patterns. The “none” keyword turns on solid lines.
existing
Apply the default settings to all existing line/shade objects in the graph.
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.