| Key Concepts |
Appendix B, "Display Attributes," documents the attribute settings that can be specified for the lines, data markers, text, or area fills in a plot. The defaults for these attributes are defined on style elements, but you can use attribute options on the plot statement to change the defaults.
For example, the LINEPARM statement provides a LINEATTRS= option that specifies the color, line pattern, or line thickness of the plot line. For non-grouped data, if you do not set a line pattern in your template, then the default line pattern for the plot is obtained from the GraphDataDefault:LineStyle style reference.
To change the default line pattern, a PATTERN= suboption on LINEATTRS= is available. Table 2.1 shows the most common line patterns available for the PATTERN= suboption.
Table 2.1: Common Line Patterns
"Available Line Patterns" provides the complete list of line patterns that can be used with the GTL.
In the following template definition, the LINEPARM statement's LINEATTRS= option overrides the default line pattern by specifying PATTERN=DASH:
proc template;
define statgraph patternchange;
begingraph;
layout overlay;
scatterplot y=height x=weight;
lineparm yintercept=intercept slope=slope /
lineattrs=(pattern=dash);
endlayout;
endgraph;
end;
Other display options can be managed the same way. For example, the SCATTERPLOT statement provides a MARKERATTRS= option that specifies the color, size, symbol, and weight of the plot data markers. For non-grouped data, if you do not set a marker symbol in your template, then the default marker symbol is obtained from the GraphDataDefault:MarkerSymbol style reference.
To change the default marker symbol, a SYMBOL= suboption on MARKERATTRS= is available. Table 2.2 shows the marker symbols available for the SYMBOL= suboption.
Table 2.2: Available Marker Symbols
In the following template definition, the SCATTERPLOT statement's MARKERATTRS= option overrides the default marker symbol by specifying SYMBOL=CIRCLEFILLED, which uses a filled circle to represent the data points.
proc template;
define statgraph symbolchange;
begingraph;
layout overlay;
scatterplot y=height x=weight /
markerattrs=(symbol=circlefilled);
endlayout;
endgraph;
end;
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.