Previous Page | Next Page

Controlling The Appearance of Your Graphs

Modifying Styles

With the TEMPLATE procedure, you can use the DEFINE STYLE statement to create your own style from scratch or from an existing style. When you create styles from existing styles, you can modify the individual style elements.

For example, the following program shows the style element GraphDataDefault, as defined in the Default style:

proc template;
   define style Styles.Default;

... more style elements ...

 class GraphDataDefault /
         endcolor = GraphColors("gramp3cend")
         neutralcolor = GraphColors("gramp3cneutral")
         startcolor = GraphColors("gramp3cstart")
         markersize = 7px
         markersymbol = "circle"
         linethickness = 1px
         linestyle = 1
         contrastcolor = GraphColors("gcdata")
         color = GraphColors("gdata");         

You can use the DEFINE STYLE statement to create a new style from the Default style and modify the GraphDataDefault style element.

The following program creates the new style MyStyleDefault, which inherits all of its style elements and style attributes from the Default style, and customizes the GraphDataDefault style element:

proc template;
   define style MyStyleDefault;
   parent=Styles.Default;
   style GraphDataDefault from GraphDataDefault /
         markersize = 10px
         markersymbol = "square";
   end;
run;

For complete documentation on using PROC TEMPLATE to modify and create styles, see TEMPLATE Procedure: Creating a Style Definition in SAS Output Delivery System: User's Guide.

For a list of the style elements that you can use with ODS Statistical Graphics, see Style Elements for Use with ODS Statistical Graphics.

Previous Page | Next Page | Top of Page