Graph 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. The following styles (among the many ODS styles) are recommended for statistical work:

  • The HTMLBLUE style is a color style that is recommended for use in Web pages or color print media. See Figure 21.20 for an example. The HTMLBLUE style inherits most of its attributes from the STATISTICAL style, which inherits from the DEFAULT style. The HTMLBLUE style has a brighter appearance than its parents with color coordination between the tables and graphs. The dominant color is blue.

    The HTMLBLUE style is one of the default styles for the HTML destination (depending on SAS option and registry settings). It is also the default style in SAS/STAT documentation. It is an all-color style; groups of observations are distinguished by color instead of by line style or symbol changes.1 Most other styles simultaneously vary colors, line styles, and marker symbols to show group membership. Output created with the HTMLBLUE style does not print well on black-and-white devices. If you need an alternative to the HTMLBLUE style that varies colors, lines, and markers, use the HTMLBLUECML style or some other style.

  • The HTMLBLUECML style is a color style that is recommended for use in Web pages or color print media. It inherits most of its attributes from the HTMLBLUE style. See Figure 21.21 for an example. 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.

  • The DEFAULT style is a color style. See Figure 21.19 for an example. Most other styles inherit some of their elements from this style. The DEFAULT style is one of the default styles for the HTML destination (depending on SAS registry and option settings). Groups of observations are distinguished by simultaneous color, line style, and symbol changes. Output created with the DEFAULT style might not print well on black-and-white devices.

  • The STATISTICAL style is a color style. See Figure 21.22 for an example. Output created with the STATISTICAL style might not print well on black-and-white devices. Groups of observations are distinguished by simultaneous color, line style, and symbol changes. The STATISTICAL style inherits elements from the DEFAULT style.

  • The ANALYSIS style is a color style with a somewhat different appearance from the STATISTICAL style. See Figure 21.23 for an example. Groups of observations are distinguished by simultaneous color, line style, and symbol changes. The ANALYSIS style inherits elements from the DEFAULT style. Output created with the ANALYSIS style might not print well on black-and-white devices.

  • The JOURNAL family of styles (JOURNAL, JOURNAL2, and JOURNAL3) consists of black-and-white or gray-scale styles that are recommended for graphs that appear in journals and in other black-and-white publications. See Figure 21.24 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 RTF style is used to produce graphs to insert into a Microsoft Word document or a Microsoft PowerPoint slide. See Figure 21.26 for an example of the RTF style, which is the default style for the RTF destination. Groups of observations are distinguished by simultaneous color, line style, and symbol changes. The RTF style inherits elements from the DEFAULT style. Output created with the RTF style might not print well on black-and-white devices.

  • The LISTING style is similar to the DEFAULT style, but with a lighter background. See Figure 21.25 for an example. It is the default style for the LISTING destination. Groups of observations are distinguished by simultaneous color, line style, and symbol changes. The LISTING style inherits elements from the DEFAULT style. Output created with the LISTING style might not print well on black-and-white devices.

You specify a style with the STYLE= option in the ODS destination statement. For example, the following statement requests RTF output produced with the JOURNAL style:

ods rtf style=Journal;

The following statement sets the style for the LISTING destination:

ods listing style=HTMLBlue;

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

Most color styles (except the HTMLBLUE style) are compromise styles in the sense that some graph elements are intentionally over-distinguished 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 HTMLBLUE style when you want groups to be distinguished only by color. You can easily modify any style to be an all-color style like HTMLBLUE. For example:

proc template;
   define style styles.Default2; 
      parent = default; 
      style Graph from Graph / attrpriority = "Color"; 
      end;
   run;

The AttrPriority = "Color" option makes a style an all-color style.

You can instead use the %MODSTYLE SAS autocall macro (see the sections Creating an All-Color Style and Style Template Modification Macro) to modify some other style so that it relies only on color for distinguishability. More generally, you can modify the colors, fonts, and other attributes of graph elements in a style by editing the style template. More information is provided in the section Styles, and detailed information is in the SAS Output Delivery System: User's Guide.