Collections of line graphs or bar charts, where the graph data is grouped by the same value, are frequently used to identify differences and similarities in behaviour. Unfortunately, by default, the colours used for each line can change across the graph collection if some group values are not present in every graph. In SAS/GRAPH this problem has been solved by generating SYMBOL or PATTERN statements based on the data, or using annotation to create all of the graph lines, bars and legends. Neither of these solutions is readily available in ODS Graphics, so this paper will explore how to solve this problem using macros to implement the graphic “layer” approach in PROC SGPLOT and PROC TEMPLATE, so that the user has complete control over the data colours and styles applied to every graph.
- SAS Global Forum, San Francisco, CA, USA – 1st May 2013
- PhUSE, London, UK – 14th October 2014