Previous Page | Next Page

SAS/GRAPH Statements

Example 6. Enhancing Titles

Features:

GOPTIONS statement options:

BORDER

TITLE statement options:

BCOLOR=

BLANK=

BOX=

COLOR=

FONT=

HEIGHT=

MOVE=

ROTATE=

UNDERLIN=

Sample library member: GTIENTI1

[output from gtienti1.sas]

This example illustrates some ways you can format title text. The same options can be used to format footnotes.

Set the graphics environment. BORDER draws a border around the graph.

goptions reset=all border;

Define title1. TITLE1 uses the default font and height defined in the default style. The HEIGHT= option sets the height of the text.

title1 "This is TITLE1" height=4;

Define TITLE3. The UNDERLIN= option underlines both text strings.

title3 underlin=1
       "TITLE3 Is"
       color=red
       " Underlined";

Define TITLE5. The ANGLE= option tilts the line of text clockwise 90 degrees and places it at the right edge of the output.

title5 color=red
       angle=-90
       "TITLE5 is Angled -90";

Define TITLE7. The ROTATE= option rotates each character in the text string at the specified angle. The HEIGHT= option sets the height of the text.

title7 height=4
       color=red
       rotate=25
       "TITLE7 is Rotated";

Define TITLE8. The BOX= option draws a green box around the text.

title8 color=green
       box=1
       "TITLE8 is Boxed";

Define TITLE9. The BLANK= option prevents the boxed title from being overwritten by TITLE10. The first COLOR= option specifies the color of the box border, and the BCOLOR= option specifies the color of the box background. The second COLOR= option specifies the text color.

title9 color=red
       box=3
       blank=yes
       bcolor=red
       color=blue
       move=(70,20)
       angle=-25
       "TITLE9 is Angled in a Red Box";

Define TITLE10. In this statement, the BOX= option draws a box around the first text string. The BOX= option is turned off by the MOVE= option that uses absolute coordinates and causes a text break.

title10 color=red
        box=1
        bcolor=blue
        move=(60,20)
        font=script
        "TITLE10 is in Script and "
        move=(60,15)
        height=2
        "is Partially Boxed, Positioned"
        move=(60,10)
                height=2
        "with Explicit Moves, and Overlaid by TITLE9"
                ;

Define footnote.

footnote justify=right "GTIENTI1  ";

Display titles and footnote. All existing titles and footnotes are automatically displayed by the procedure.

proc gslide;
run;
quit;

Previous Page | Next Page | Top of Page