SAS Institute. The Power to Know

SAS/GRAPH(R) 9.2 Reference

Previous Page | Next Page

Controlling The Appearance of Your Graphs

About Style Templates

An ODS style is a collection of named style elements that provides specific visual attributes for the presentation aspects (color, font face, font size, and so on) of your graphical and tabular SAS output. Each style element is a named collection of style attributes such as color, marker symbol, line style, font face, as well as many others. Each graphical element of a plot, such as a marker, a bar, a line or a title, derives its visual attributes from a specific style element from the current style.

Note:   The style that a destination uses is applied to tabular output as well as graphical output.  [cautionend]


ODS Destinations and Default Styles

Every ODS output destination, except the Document and Output destinations, has a default style associated with it. These default styles are different for each destination, therefore your output might look different depending on which destination you use. If your program does not specify a style, SAS uses the styles listed in Default Style Templates.

Default Style Templates
ODS Destination Default Style Name
DOCUMENT not applicable
LISTING Listing
OUTPUT not applicable
HTML Default
LATEX Default
PRINTER ColorPrinter for PDF and PS, monochromePrinter for PCL
RTF RTF
Measured RTF RTF

The default styles for these destinations are set in the SAS registry. Changing the default style for these destinations in the SAS registry is a convenient way to apply a company's style to all output sent to all destinations. See Changing the Default Style in the SAS Registry.

For example, Tabular Output Using the Default HTML Style and Graphical Output Using the Default HTML Style show what tabular output and SAS/GRAPH output look like when they are sent to the HTML destination and no style is specified. Tabular Output Using the Default PDF Style and Graphical Output Using the Default PDF Style what tabular output and SAS/GRAPH output look like when they are sent to the PDF destination and no style is specified. In all cases, the default style listed in Default Style Templates was used.

Tabular Output Using the Default HTML Style

[Tabular Output Using the Default HTML Style]

Graphical Output Using the Default HTML Style

[Graphical Output Using the Default HTML Style]

Tabular Output Using the Default PDF Style

[Tabular Output Using the Default PDF Style]

Graphical Output Using the Default PDF Style

[Graphical Output Using the Default PDF Style]


Recommended Styles

SAS ships a set of styles that have been designed by GUI experts to address the needs of different situations. Recommended Style Templates describes a subset of the styles shipped with SAS that are particularly well-suited to displaying graphics.

Recommended Style Templates
Desired Output Recommended Styles Additional
Full Color Default gray background, optimized for HTML output
Analysis yellow background
Statistical white background, colored fills
Listing white background, optimized for color format on white paper
Printer optimized for PS and PDF output
Black and White monochromePrinter black and white output

Journal2 interior filled areas have no color
Gray Scale Journal interior filled areas are gray scale

Note:   Certain ODS styles map textures onto graph elements. For the Java devices, these textures can be applied to two-dimensional rectangles only. Therefore, styles with textures cannot be applied to three-dimensional bar and pie charts in Java graphs.   [cautionend]


Viewing the List of Available Styles

To view the list of all styles available, submit the following code:

proc template;
     list styles;
run;


Examples of Output Using Different Styles

Each of the following graphs was created using a different style.

Output Using the Listing Style

[Output Using the Listing Style]

HTML Output Using the Default Style

[HTML Output Using the Default Style]

Output Using the Analysis Style

[Output Using the Analysis Style]

Output Using the Journal Style

[Output Using the Journal Style]

Previous Page | Next Page | Top of Page