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 Priorities 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 21.1.
Table 21.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 21.26. |
DEFAULT |
HTML |
None |
A color style, with bold sans serif fonts, whose dominant colors are gray, blue, and white. See Figure 21.22. |
HTMLBLUE |
HTML |
Color ✓ |
A color style, with sans serif fonts, whose dominant colors are shades of blue. See Figure 21.23. Default for HTML destination and SAS/STAT documentation. |
HTMLBLUECML |
HTML |
None ✓ |
An ATTRPRIORITY="None" version of HTMLBLUE. See Figure 21.24. |
JOURNAL, |
PDF, PS, RTF, |
None ✓ |
A black-and-white style with sans serif fonts and filled areas. See Figure 21.27, Figure 21.32, and Figure 21.33. |
JOURNAL2, |
PDF, PS, RTF, |
None ✓ |
A black-and-white style, similar to JOURNAL but with empty areas. Grouped bar charts use crosshatching to show groups. See Figure 21.34 and Figure 21.35. |
JOURNAL3, |
PDF, PS, RTF, |
None ✓ |
A black-and-white style, similar to JOURNAL2 but with a mix of filled areas and crosshatching in grouped bar charts. See Figure 21.36 and Figure 21.37. |
LISTING |
HTML, |
None |
A color style, similar to DEFAULT but with a white background. See Figure 21.28. Default for the LISTING destination. |
PEARL |
PDF, PS, RTF, |
Color ✓ |
A color style, with sans serif fonts and a white background, whose dominant colors are shades of blue. See Figure 21.30 and Figure 21.38. Default for PDF destination. |
PEARLJ |
PDF, PS, RTF, |
Color ✓ |
A color style, with sans serif fonts and a white background, whose dominant colors are shades of blue. See Figure 21.39. 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 21.29 and Figure 21.40. Default for RTF destination. |
SAPPHIRE |
PDF, PS, RTF, |
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 21.31 and Figure 21.41. |
STATISTICAL |
HTML |
None |
A color style, with sans serif fonts, whose dominant colors are blue, gray, and white. See Figure 21.25. |
✓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 21.54 shows how colors, markers, and line styles change in the HTMLBLUE style, and Figure 21.53 shows how these change in most other ODS styles.