Statistical Graphics Using ODS


An Overview of Styles

An ODS style template provides formatting information for specific visual aspects of your SAS output (see the section 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 headers, and table cells. For graphs, 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 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, it affects graphs but not tables. Output produced with different styles has the same content, but a different visual appearance. For example, the following statement requests output produced with the JOURNAL style:

ods rtf style=Journal;

You can use any SAS style or any style that you define yourself. The following statements list the names of all of 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) are a list of over fifty styles in the SAS listing and five style templates in the SAS log. Style templates are often hundreds of lines long. See the section Style Templates and Colors for more information about style templates. Although you can use any style, only a few styles are typically used with ODS Graphics. They are described in Table 21.2.

Table 21.2: Styles

Style

Default in

Description

HTMLBLUE

HTML and
SAS/STAT
documentation

An all-color style whose dominant colors are shades of blue with sans-serif fonts. See Figure 21.20.

HTMLBLUECML

 

A color style whose dominant colors are shades of blue with sans-serif fonts. See Figure 21.21.

PEARL

 

A color style with a white background whose dominant colors are shades of blue with sans-serif fonts. See Figure 21.27.

SAPPHIRE

 

A color style with a white background and light blue table header background whose dominant colors are shades of blue with sans-serif fonts. See Figure 21.28.

DEFAULT

HTML

A color style whose dominant colors are gray, blue, and white, with bold sans-serif fonts. See Figure 21.19.

STATISTICAL

 

A color style whose dominant colors are blue, creamy gray, and white, with sans-serif fonts. See Figure 21.22.

LISTING

LISTING

A color style, similar to DEFAULT but with a white background. See Figure 21.25.

JOURNAL

 

A black-and-white style with filled areas, with sans-serif fonts. See Figure 21.24.

JOURNAL2

 

A black-and-white style, similar to JOURNAL but with empty areas. Grouped bar charts use crosshatching to show groups. See Output 21.3.2.

JOURNAL3

 

A black-and-white style, similar to JOURNAL2 but with a mix of filled areas and crosshatching in grouped bar charts. See Output 21.3.3.

RTF

RTF

A color style whose dominant colors are blue, white, and black, with Times Roman fonts. See Figure 21.26.

ANALYSIS

 

A color style, similar to STATISTICAL, whose dominant color is tan. See Figure 21.23.


Each ODS destination has its own default style, as shown in Table 21.2. Most output in SAS/STAT documentation uses 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.