The DTREE Procedure

ODS Style Templates

ODS style templates, or styles, control the overall look of your output. An ODS style template consists of a set of style elements. A style element is a collection of style attributes that apply to a particular feature or aspect of the output. You can specify a value for each attribute in a style. See Chapter 21: Statistical Graphics Using ODS in SAS/STAT 13.2 User's Guide, for a thorough discussion of ODS Graphics.

To create your own style or to modify a style for use with ODS Graphics, you need to understand the relationships between style elements and graph features. This information is provided in the ODS Graphics documentation at http://support.sas.com/documentation/onlinedoc/base/ . You create and modify style templates with the TEMPLATE procedure. For more information, see the section "TEMPLATE Procedure: Creating a Style Template" in the SAS Output Delivery System: User's Guide. Kuhfeld (2010) also offers detailed information and examples.

PROC DTREE Style Template

A predefined ODS style template named DTREE is available for the DTREE procedure. You can use the template to maintain a consistent appearance in all graphical output produced by the procedure.

To change the current style, specify the STYLE= option in an ODS destination statement. The specified style is applied to all output for that destination until you change or close the destination or start a new SAS session. For example, the following statement specifies that ODS should apply the DTREE style template to all HTML output:

ods html style=dtree;

To disable the use of graphical styles, specify the SAS system option NOGSTYLE.

The parent style template for the DTREE style is the DEFAULT style. Table 7.19 lists the style elements (in bold) and corresponding attributes specified in the DTREE style. The table also indicates which, if any, PROC DTREE options or graphics options (in a GOPTIONS statement) can be used to override the value of a style attribute.

Table 7.19: Style Elements and Attributes in the DTREE Style

Element/Attributes

Description

DTREE Option

GOPTION

GraphColors

Colors of various graph features

   

gcdata5

Decision nodes

CSYMBOLD=

COLORS=

gcdata1

Chance nodes

CSYMBOLC=

COLORS=

gcdata8

End nodes

CSYMBOLE=

COLORS=

gcdata3

Regular links

CLINK=

COLORS=

gcdata2

Optimal links

CBEST=

COLORS=

gtextt

Title text

 

CTITLE=

gtext

Text

 

CTEXT=

GraphFonts

Fonts for various graph features

   

GraphDataFont

Default

 

FTEXT=

GraphLabelFont

Labels

 

FTEXT=

GraphTitleFont

Title text

 

FTITLE=

GraphDataText

Attributes related to general text

   

ContrastColor

GraphColors('gtext')

CTEXT=

CTEXT=

Font

GraphFonts('GraphDataFont')

FTEXT=

FTEXT=

GraphTitleText

Attributes related to title text

   

Color

GraphColors('gtext')

 

CTITLE=

Font

GraphFonts('gtext')

 

FTITLE=

GraphLabelText

Attributes related to label text

   

Color

GraphColors('glabel')

 

CTEXT=

Font

GraphFonts('GraphTitleFont')

 

FTEXT=

GraphDataDefault

Default values

   

Color

GraphColors('gdata')

 

COLORS=

GraphBackground

Attributes related to graph background

   

Image

Dtree.jpg

 

CBACK=


Attributes that you do not override retain the values specified in the style template.

Figure 7.11 demonstrates features of the DTREE graphical style. The decision tree in the figure is the first output from Example 7.4.

Figure 7.11: DTREE Style Template: Example

DTREE Style Template: Example


Default Values

If the SAS system option GSTYLE is in effect (this is the default), then the default values of certain PROC DTREE options can depend on the current ODS style template. See the section Displaying the Decision Tree for more information.