Object Reference : Object View and Procedure Reference : Graph
  
 
template
Apply a template to a graph object.
If you apply template to a multiple graph object, the template options will be applied to each graph in the multiple graph. If the template graph is a multiple graph, the options of the first graph will be used.
Syntax
graph_name.template(options) template
Follow the name of the graph to which you want to apply the template options with a period, the keyword template, and the name of a graph template. template may be one of the predefined template keywords: “default” (current global defaults), “classic”, “modern”, “reverse”, “midnight”, “spartan”, “monochrome”, or a named graph in the workfile.
Options
 
t
Replace text and line/shade objects with those of the template graph, when template is the name of a graph in the workfile.
e
Apply template settings to existing text and line/fill options.
b / -b
[Apply / Remove] bold modifiers of the specified predefined template style.
w / -w
[Apply / Remove] wide modifiers of the specified predefined template style.
axis / -axis
[Apply / Remove] axis modifiers of the specified template.
legend / -legend
[Apply / Remove] legend modifiers of the specified template.
The options which support the “–” may be preceded by a “+” or “–” indicating whether to turn on or off the option. The “+” is optional.
Examples
gra_cs.template gra_gdp
applies the option settings in the graph object GRA_GDP to the graph GRA_CS. Text and line shading options from GRA_GDP will be applied to GRA_CS, but the characteristics of existing text and line/shade objects in GRA_CS will not be modified. Text and shading objects include those added with the Graph::addtext or Graph::draw commands.
g1.template(t) mygraph1
applies the option settings of MYGRAPH1, and all text and shadings in the template graph, to the graph G1. Note that the “t” option overwrites any existing text and shading objects in the target graph.
graph1.template(e) modern
applies the predefined template “modern” to GRAPH1, also changing the settings of existing text and line/shade objects in the graph.
graph1.template(e, b, w) reverse
applies the predefined template “reverse” to GRAPH1, with the bold and wide modifiers. Any existing text and line/shade objects in GRAPH1 are also modified to use the object settings of the monochrome template.
graph1.template(-w) monochrome
applies the monochrome settings to GRAPH1, removing the wide modifier.
If you are using a boxplot as a template for another graph type, or vice versa, note that the graph types and boxplot specific attributes will not be changed. In addition, when the “t” option is used, vertical lines or shaded areas will not be copied between the graphs, since the horizontal scales differ.
Cross-references
See “Templates” for additional discussion.