An ODS style template provides formatting information for specific visual aspects of your SAS output (see the section ODS Style Elements and Attributes). The appearance of tables and graphs is coordinated within a particular style. For tables, this information includes a list of fonts and a list of colors. Each font definition specifies a family, size, weight, and style. Colors are associated with common areas of output, including titles, footnotes, BY groups, table headings, and table cells. For graphs, ODS styles also control the appearance of graph elements, including lines, markers, fonts, and colors. ODS styles also include elements specific to statistical graphics, such as the style of fitted lines, confidence bands, and prediction limits. For more information about ODS styles, see Kuhfeld (2010) and the SAS Output Delivery System: User's Guide.
You can specify a style by using the STYLE= option in an ODS destination statement such as HTML, PDF, RTF, or PRINTER. You can also specify a style in the LISTING destination; however, this style affects graphs but not tables. Output that is produced by using different styles has the same content but a different appearance. For example, the following statement requests output that is produced by using the JOURNAL style:
ods rtf style=Journal;
You can use any ODS style or any style that you define yourself. The following statements list the names of all the styles and then display five of them:
proc template; list styles; source Styles.Default; source Styles.Statistical; source Styles.Journal; source Styles.RTF; source Styles.HTMLBlue; run;
The results of this step (not shown) include a list of more than 50 styles in the SAS listing and five style templates in the SAS log. Style templates are often hundreds of lines long. For more information about style templates, see the section Style Templates and Colors.
Each ODS destination has its own default style, as shown in Table 21.1 and mentioned throughout this section. Most graphs in SAS/STAT documentation use the HTMLBLUE style. However, throughout this chapter, you can see examples of other styles. For more information about styles, see the SAS Output Delivery System: User's Guide.
The rest of this section describes a few ODS styles. There are many more ODS styles than are listed here. Most styles are not designed for statistical work. The following styles are used most often for statistical work.
The HTMLBLUE style is a modern color style that is recommended for use in web pages or color print media. (See Figure 21.23 for an example.) The HTMLBLUE style is an ATTRPRIORITY="Color" style. The HTMLBLUE style inherits most of its attributes from the STATISTICAL style, which inherits some of its attributes from the DEFAULT style. The HTMLBLUE style has a brighter appearance than its parents, and it has color coordination between the tables and graphs. The dominant color is blue.
The HTMLBLUE style is the default style for the HTML destination. It is also the default style in SAS/STAT documentation for tables displayed in the HTML format and graphs displayed in both the PDF and HTML formats.[11]
Output that you create by using the HTMLBLUE style might not print well on black-and-white devices (particularly when you create graphs that have groups of observations). If you need an alternative to the HTMLBLUE style that varies colors, lines, and markers, use the HTMLBLUECML style or most other styles. If you need an alternative to the HTMLBLUE style that is designed for printer destinations such as PRINTER, PDF, PS, and RTF, see the PEARL, PEARLJ, and SAPPHIRE styles.
The HTMLBLUECML style is a modern color style that is recommended for use in web pages or color print media. (See Figure 21.24 for an example.) It inherits most of its attributes from the HTMLBLUE style. The dominant color is blue. The HTMLBLUECML style is an ATTRPRIORITY="None" style. In graphs, groups of observations are distinguished by simultaneous color, line style, and symbol changes. If you need an alternative to the HTMLBLUECML style that is all color, use the HTMLBLUE style instead. Output that you create by using the HTMLBLUECML style might not print well on black-and-white devices.
The PEARL style is a modern color style that is recommended for use in documents that are created by using printer destinations such as PRINTER, PDF, PS, and RTF. Graphs are displayed in color, and tables are displayed in black and white. (See Figure 21.30 for an example.) The PEARL style shares most of its attributes with the SAPPHIRE style. Both styles inherit most of their attributes from the HTMLBLUE style; hence the dominant color is blue. The differences are outside the graphs (in the tables and in the page background). The HTMLBLUE style has a very light blue background, and the PEARL style has a white background. The PEARL style also has a white background for row and column table headings, whereas the SAPPHIRE style has a light blue background. The PEARL and SAPPHIRE styles use fonts that are appropriate for printer destinations. The PEARL style is an ATTRPRIORITY="Color" style. In graphs, groups of observations are distinguished by color. Output that you create by using the PEARL style might not print well on black-and-white devices (particularly when you create graphs that have groups of observations).
The PEARLJ style is a modern style that is recommended for use in documents that are created by using printer destinations such as PRINTER, PDF, PS, and RTF. Graphs are displayed in color, and tables are displayed in black and white. The PEARLJ style inherits all of its graphical attributes and most of its other attributes from the PEARL style. The two styles display tables differently. The PEARLJ style uses smaller fonts and less cell padding, and it displays horizontal but not vertical lines. The PEARLJ style is the default style for tables that are displayed in the PDF version of SAS/STAT documentation. The PEARLJ style is an ATTRPRIORITY="Color" style. In graphs, groups of observations are distinguished by color. Output that you create by using the PEARL style might not print well on black-and-white devices (particularly when you create graphs that have groups of observations).
The SAPPHIRE style is a modern color style that is recommended for use in documents that are created by using printer destinations such as PRINTER, PDF, PS, and RTF. (See Figure 21.31 for an example.) The SAPPHIRE style shares most of its attributes with the PEARL style. Both styles inherit most of their attributes from the HTMLBLUE style; hence the dominant color is blue. However, unlike the HTMLBLUE style (which has a very light blue background), the SAPPHIRE style has a white background. The SAPPHIRE style has a light blue background for row and column table headings, whereas the PEARL style has a white background. The SAPPHIRE and PEARL styles use fonts that are appropriate for printer destinations. The SAPPHIRE style is an ATTRPRIORITY="Color" style. In graphs, groups of observations are distinguished by color. Output that you create by using the SAPPHIRE style might not print well on black-and-white devices (particularly when you create graphs that have groups of observations).
The JOURNAL family of styles (JOURNAL, JOURNAL2, and JOURNAL3) consists of black-and-white or grayscale styles that are recommended for graphs that appear in journals and other black-and-white publications. (See Figure 21.27 for an example of the JOURNAL style, see Figure 21.9 for an example of the JOURNAL2 style, and see Example 21.3 for a comparison of the three styles.) The JOURNAL1A, JOURNAL2A, and JOURNAL3A styles inherit most of their attributes from the JOURNAL, JOURNAL2, and JOURNAL3 styles, respectively, but use fewer italic fonts. For color alternatives to the JOURNAL family of styles, see the PEARL, PEARLJ, and SAPPHIRE styles.
The DEFAULT style is a legacy color style. (See Figure 21.22 for an example.) Most other styles inherit some of their elements from this style. The DEFAULT style was the default style for the HTML destination in earlier SAS releases. The dominant color is gray. The DEFAULT style is an ATTRPRIORITY="None" style. In graphs, groups of observations are distinguished by simultaneous color, line style, and symbol changes. Output that you create by using the DEFAULT style might not print well on black-and-white devices.
The STATISTICAL style is a legacy color style. (See Figure 21.25 for an example.) The STATISTICAL style inherits elements from the DEFAULT style, and it is similar in some ways (other than color) to the ANALYSIS style. The dominant colors are blue and gray. The STATISTICAL style is an ATTRPRIORITY="None" style. In graphs, groups of observations are distinguished by simultaneous color, line style, and symbol changes. Output that you create by using the STATISTICAL style might not print well on black-and-white devices.
The ANALYSIS style is a legacy color style. (See Figure 21.26 for an example.) The ANALYSIS style inherits elements from the DEFAULT style, and it is similar in some ways (other than color) to the STATISTICAL style. The dominant colors are green and yellow. The ANALYSIS style is an ATTRPRIORITY="None" style. In graphs, groups of observations are distinguished by simultaneous color, line style, and symbol changes. Output that you create by using the ANALYSIS style might not print well on black-and-white devices.
The RTF style is a legacy color style that is designed for graphs that will be inserted into a Microsoft Word document or PowerPoint slide. (See Figure 21.29 for an example of the RTF style, which is the default style for the RTF destination.) The RTF style inherits elements from the DEFAULT style. The dominant color is gray. The ANALYSIS style is an ATTRPRIORITY="None" style. In graphs, groups of observations are distinguished by simultaneous color, line style, and symbol changes. Output that you create by using the RTF style might not print well on black-and-white devices. For alternatives to the RTF style that are brighter and less gray, see the PEARL, PEARLJ, and SAPPHIRE styles.
The LISTING style is a legacy color style that is similar to the DEFAULT style, but the LISTING style has a lighter background. (See Figure 21.28 for an example.) It is the default style for the LISTING destination. The LISTING style inherits elements from the DEFAULT style. The dominant colors are black and white. The LISTING style is an ATTRPRIORITY="None" style. In graphs, groups of observations are distinguished by simultaneous color, line style, and symbol changes. Output that you create by using the LISTING style might not print well on black-and-white devices.