SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Enhancing and Exporting Charts and Plots
Specifying Titles and Footnotes


Enhancing Titles and Footnotes

With SAS/GRAPH procedures, you can also specify many options in TITLE and FOOTNOTE statements. To set the color, font, and height for titles and footnotes, you use the FONT=, COLOR=, and HEIGHT= options. These options come before the text they affect.


General form, FONT=, COLOR=, and HEIGHT= options:
FONT=font

COLOR=color

HEIGHT=text-height <units>

where

  • font is a valid SAS name. The specified font can be supplied by SAS software, user-generated, or a hardware font. Valid font names include SWISS, SWISSB (Swiss Bold), SIMPLEX, CENTX (Century), CENTB (Century Bold), and ZAPF.

  • color is any color that is valid for your graphics device.

  • text-height is a value for height.

  • units is a unit of measurement. Valid units are percentage of the display area (PCT), inches (IN), centimeters (CM), points (PT), and character cells (CELL).
NOTE: Remember that titles and footnotes are global. The options that you specify in TITLE and FOOTNOTE statements remain in effect until you cancel them, re-specify them, or end the SAS session.


For example, this program specifies
  • a red title that is .7 centimeters tall in the Century Bold font
  • a blue footnote that is .5 centimeters tall in the Swiss font.
     title1 color=red font=centb h=0.7 cm
            'Total Revenue for Males';
     footnote1 color=blue h=0.5 cm 
               font=swiss 'For March 1-15';
     footnote2 ' ';
     proc gchart data=clinic.admit;
        hbar actlevel / sumvar=fee
             patternid=midpoint sum;
        where sex='M';
        label actlevel='Activity Level';
        format fee dollar5.;
     run;

The program produces the bar chart below. Notice the second footnote, which is only a blank line added for better readability.


Display chart with text height specification.


back||next

Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement