Statistical Graphics Using ODS

ODS Styles

ODS styles control the overall appearance of graphs and tables. They specify colors, fonts, line styles, symbol markers, and other attributes of graph elements. There are two types of ODS styles:

  • ATTRPRIORITY='Color' style, which distinguishes groups of observations by color changes and not by line style or symbol changes.[9] ATTRPRIORITY='Color' styles include HTMLBLUE, PEARL, PEARLJ, and SAPPHIRE. If you want to control the markers or lines that are displayed for groups of observations when using an ATTRPRIORITY='Color' style, be sure to first specify the ATTRPRIORITY=NONE option in the ODS GRAPHICS statement or switch to an ATTRPRIORITY='None' style. For more information, see the sections Attribute Priority and Overriding How Groups Are Distinguished.

  • ATTRPRIORITY='None' style, which distinguishes groups of observations by simultaneous color, marker, and line changes. Most ODS styles are ATTRPRIORITY='None' styles. They are compromise styles in the sense that some graph elements are intentionally overdistinguished to facilitate black-and-white printing. For example, fit lines that correspond to different classification levels are distinguished by both colors and line patterns. You can use the ATTRPRIORITY='Color' styles (such as HTMLBLUE, PEARL, PEARLJ, and SAPPHIRE) when you want groups to be distinguished only by color.

Although you can use any ODS style, only a few styles are usually used with ODS Graphics. They are described in Table 1.

Table 1: ODS Styles Most Often Used with ODS Graphics

Style Recommended Destinations Attribute Priority Description
ANALYSIS HTML None A color style, with sans serif fonts, whose dominant colors are yellow, green, and tan. See Figure 22.
DEFAULT HTML None A color style, with bold sans serif fonts, whose dominant colors are gray, blue, and white. See Figure 18.
HTMLBLUE HTML Color ✓ A color style, with sans serif fonts, whose dominant colors are shades of blue. See Figure 19. Default for HTML destination and SAS/STAT documentation.
HTMLBLUECML HTML None ✓ An ATTRPRIORITY='None' version of HTMLBLUE. See Figure 20.
JOURNAL,
JOURNAL1A
PDF, PS, RTF,
PRINTER
None ✓ A black-and-white style with sans serif fonts and filled areas. See Figure 23, Figure 28, and Figure 29.
JOURNAL2,
JOURNAL2A
PDF, PS, RTF,
PRINTER
None ✓ A black-and-white style, similar to JOURNAL but with empty areas. Grouped bar charts use crosshatching to show groups. See Figure 30 and Figure 31.
JOURNAL3,
JOURNAL3A
PDF, PS, RTF,
PRINTER
None ✓ A black-and-white style, similar to JOURNAL2 but with a mix of filled areas and crosshatching in grouped bar charts. See Figure 32 and Figure 33.
LISTING HTML,
LISTING
None A color style, similar to DEFAULT but with a white background. See Figure 24. Default for the LISTING destination.
PEARL PDF, PS, RTF,
PRINTER
Color ✓ A color style, with sans serif fonts and a white background, whose dominant colors are shades of blue. See Figure 26 and Figure 34. Default for PDF destination.
PEARLJ PDF, PS, RTF,
PRINTER
Color ✓ A color style, with sans serif fonts and a white background, whose dominant colors are shades of blue. See Figure 35. Default for PDF tables in SAS/STAT documentation.
RTF RTF None A color style, with serif (Times Roman) fonts, whose dominant colors are blue, white, and black. See Figure 25 and Figure 36. Default for RTF destination.
SAPPHIRE PDF, PS, RTF,
PRINTER
Color ✓ A color style, with sans serif fonts, a white background, and a light blue table heading background, whose dominant colors are shades of blue. See Figure 27 and Figure 37.
STATISTICAL HTML None A color style, with sans serif fonts, whose dominant colors are blue, gray, and white. See Figure 21.
✓indicates newer styles that are recommended for use with statistical graphics.
JOURNAL# styles differ from JOURNAL#A styles in that the former use italic fonts in table headings.


You specify an ODS style by using the STYLE= option in the ODS destination statement. For example, the following statement creates RTF output and specifies the JOURNAL style:

ods rtf style=Journal;

The following statement sets the style for the LISTING destination:

ods listing style=HTMLBlue;

The style that is specified by the STYLE= option in the ODS LISTING statement applies only to graphs. SAS monospace format is used for tables.

More generally, you can modify the colors, fonts, and other attributes of graph elements in an ODS style by editing the style template. For more information, see the section ODS Styles and SAS Output Delivery System: User’s Guide. You can also perform ODS style modifications by using the %MODSTYLE SAS autocall macro. For more information, see the section ODS Style Template Modification Macro.



[9] More precisely, an ATTRPRIORITY='Color' style such as HTMLBLUE distinguishes the first 12 groups of observations only by color. Markers and lines change for groups 13–24 and then again for groups 25–36. Figure 50 shows how colors, markers, and line styles change in the HTMLBLUE style, and Figure 49 shows how these change in most other ODS styles.

Last updated: December 09, 2022