Modifying ODS Statistical Graphics Templates in SASŪ 9.2
Warren F. Kuhfeld, Revised and Enhanced from SAS Global Forum Paper 323-2009.
![]()
With the release of SAS 9.2, over sixty statistical procedures use ODS Statistical Graphics to produce graphs as automatically as they produce tables. This paper reviews the basics of ODS Statistical Graphics and focuses on programming techniques for modifying the default graphs. Each graph is controlled by a template, which is a SAS program written in the Graph Template Language (GTL). This powerful language specifies graph layouts (lattices, overlays), types (scatter plots, histograms), titles, footnotes, insets, colors, symbols, lines, and other graph elements. SAS provides the default templates for graphs, so you do not need to know any details about templates to create statistical graphics. However, with some understanding of the GTL, you can modify the default templates to permanently change how certain graphs are created. Alternatively, you can make immediate and ad hoc changes to specific graphs by using the point-and-click ODS Graphics Editor. This paper presents examples to help you navigate the complexity of the default templates and safely customize elements such as titles, axis labels, colors, lines, markers, ticks, grids, axes, reference lines, and legends.