Chapter Contents

Previous

Next
SAS/GRAPH Software: Reference

Example 6. Enhancing Titles

Features:
GOPTIONS statement options:
FTITLE=
FTEXT=
GUNIT=
HTITLE=
HTEXT=
TITLE statement options:
ANGLE=
BCOLOR=
BLANK=
BOX=
COLOR=
FONT=
HEIGHT=
MOVE=
ROTATE=
UNDERLIN=

Sample library member: GR08N06

[IMAGE]

This example illustrates some the ways you can format title text. The same options can be used to format footnotes. The GOPTIONS statement in the example determines the font and heights used for the first title line and all remaining text in the display. GOPTIONS also determines that percentages of the graphics output area are used as the unit of measure for heights in the graph.

Assign the libref and set the graphics environment. FTITLE= assigns the font that is used by the TITLE1 statement. FTEXT= assigns the font for all other text. HTITLE= makes the height of TITLE1 7 percent of the graphics output area, the units defined by the GUNIT= option. HTEXT= makes the height of all other text 5 percent of the graphics output area.

goptions reset=global gunit=pct border cback=white
         colors=(black blue green red)
         ftitle=zapfb ftext=swissb htext=5;

Define title1. TITLE1 uses the default font and height defined in the GOPTIONS statement.

title1 'This is TITLE1';

Define TITLE3. Because TITLE2 is not assigned, the output displays a blank line. UNDERLIN= underlines both text strings.

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

Define TITLE5. ANGLE= 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. ROTATE= rotates each character in the text string at the specified angle. HEIGHT= overrides HTEXT= in the GOPTIONS statement.

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

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

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

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

title9 color=red
       box=3
       blank=yes
       bcolor=red
       color=blue
       angle=-25
       'TITLE9 is Angled in a Red Box';

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

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

Define footnote.

footnote h=3 justify=right 'GR08N06  ';

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

proc gslide;
run;
quit;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.