TITLE, FOOTNOTE, and NOTE Statements


The TITLE, FOOTNOTE, and NOTE statements control the content, appearance, and placement of text.

Used by:

  • GBARLINE, GCHART, GCONTOUR, GFONT, GMAP, GPLOT, GPRINT, GRADAR, GSLIDE, G3D procedures

Global: TITLE and FOOTNOTE

Description

TITLE, FOOTNOTE, and NOTE statements add text to maps, plots, charts , and text slides. With these statements you can

  • control the content, appearance, and placement of the text, including color , size , font, and alignment

  • underline or draw boxes around the text

  • draw straight lines on the output.

Figure 7.23 on page 211 shows the default appearance and placement of titles, footnotes, and notes on the graphics output area.

click to expand
Figure 7.23: Default Placement of Titles, Footnotes, and Notes

Titles are centered at the top of the graphics output in the title area . They are positioned in numeric order with the lowest -numbered TITLE at the top of the title area and the highest-numbered TITLE at the bottom of the title area.

TITLE statements have these default characteristics:

  • TITLE1 is twice the height of all other titles and uses the SWISS font.

  • All other TITLE statements are one unit high and use the default hardware font.

Footnotes are positioned similarly in the footnote area at the bottom of the graphics output area, with the lowest numbered FOOTNOTE at the top of the footnote area. Unless otherwise specified, they use the default hardware font and are one unit high.

Space for the title area and the footnote area is taken from the procedure output area. The more titles and footnotes you specify and the bigger they are, the smaller the procedure output area will be.

Notes are positioned at the top of the procedure output area and are left justified. The statements appear one below another in the order they appear in the program. Unless otherwise specified, they use the default hardware font and are one unit high.

For more information on titles, footnotes, and notes in the graphics output area, see Placement of Graphic Elements in the Graphics Output Area on page 39.

Syntax

  • TITLE <1...10>< text-argument(s) >;

  • FOOTNOTE <1...10>< text-argument(s) >;

  • NOTE < text-arguments(s) >;

  • text-argument(s) can be one or more of these:

    • text-string

    • text-options (text options must precede text-string.)

  • text-options can be one or more of the following, in any order:

    • appearance options

      • COLOR= color

      • FONT= font

      • HEIGHT= text-height < units >

    • placement and spacing options

      • JUSTIFY=LEFT CENTER RIGHT

      • LSPACE= line-space < units >

      • MOVE=( x,y )< units >

    • baseline angling and character rotation options

      • ANGLE= degrees

      • LANGLE= degrees

      • ROTATE= degrees

    • boxing, underlining, and line drawing options

      • BCOLOR= background-color

      • BLANK=YES

      • BOX=1...4

      • BSPACE= box-space < units >

      • DRAW=( x , y ..., x-n , y-n )< units >

      • UNDERLIN=0...3

    • linking option

      • LINK= url

Options

When the syntax of an option includes units , use one of these:

CELLS

character cells

CM

centimeters

IN

inches

PT

points

PCT

percentage of the graphics output area

If you omit units , a unit specification is searched for in this order:

  1. the GUNIT= option in a GOPTIONS statement

  2. the default unit, CELLS.

ANGLE= degrees

A= degrees

  • specifies the angle of the baseline of the entire text string with respect to the horizontal. A positive degrees value will angle the baseline counterclockwise; a negative value will angle it clockwise. By default, ANGLE=0 (horizontal).

  • Angled titles or footnotes may require more vertical space and, consequently, may increase the size of the title area or the footnote area, thereby reducing the vertical space in the procedure output area.

  • Using the BOX= option with angled text does not produce angled boxes; the box is sized to accommodate the angled note.

  • Using the ANGLE= option after one text string and before another can reset some options to their default values. See Using Options That Can Reset Other Options on page 225.

  • ANGLE= has the same effect on the text as LANGLE=, except when you specify an angle of 90 degrees or -90 degrees. In these angle specifications, the procedure output area is shrunk from the left or right to accommodate the angled title or footnote. The result depends on the statement in which you use the option:

    • With the TITLE statement:

      Figure 7.24 on page 213 shows how ANGLE=90 degrees or ANGLE=-90 degrees positions and rotates title text.

      • ANGLE=90

        • positions the title at the left edge of the graphics output area, angled 90 degrees (counterclockwise) and centered vertically.

      • ANGLE=-90

        • positions the title at the right edge of the graphics output area, angled -90 degrees (clockwise) and centered vertically.

    • With the FOOTNOTE statement:

      Figure 7.25 on page 214 shows how ANGLE=90 degrees or ANGLE=-90 degrees positions and rotates footnote text.

      click to expand
      Figure 7.25: Positioning Footnotes with the ANGLE=Option

      • ANGLE=90

        • positions the footnote at the right edge of the graphics output area, angled 90 degrees (counterclockwise) and centered vertically.

      • ANGLE=-90

        • positions the footnote at the left edge of the graphics output area, angled -90 (clockwise) and centered vertically.

    • With the NOTE statement:

      Figure 7.26 on page 214 shows how ANGLE= 90 degrees or -90 degrees positions and rotates note text.

      click to expand
      Figure 7.26: Positioning Notes with the ANGLE= Option

      • ANGLE=90

        • positions the note at the bottom of the left egde of the graphics output area, angled 90 degrees (counterclockwise) and reading from bottom to top.

      • ANGLE=-90

        • positions the note at the top of the right edge of the graphics output area, angled -90 (clockwise) and reading from top to bottom.

    • See also: the options LANGLE= on page 219 and ROTATE= on page 222

    • Featured in: Example 6. Enhancing Titles on page 238

    • Not supported by: Java, ActiveX

BCOLOR= background-color

BC= background-color

  • specifies the background color of a box produced by the BOX= option. If you omit BOX=, BCOLOR= is ignored. By default, the background color of the box is the same as the background color for the entire graph. The color of the frame of the box is determined by the color specification used in BOX=.

  • Note: BCOLOR= may be reset by ANGLE= or JUSTIFY=, or by MOVE= with absolute coordinates. See Using Options That Can Reset Other Options on page 225 for details.

  • See also: the option BOX= on page 215.

  • Featured in: Example 6. Enhancing Titles on page 238.

BLANK=YES

BL=YES

  • protects the box and its contents from being overwritten by any subsequent graphics elements by blanking out the area where the box is displayed. BLANK= enables you to overlay graphics elements with boxed text. It is ignored if you omit BOX=. Because titles and footnotes are written from the highest numbered to the lowest numbered, the BLANK= option only blanks out titles and footnotes of a lower number.

  • Note: BLANK= may be reset by ANGLE= or JUSTIFY=, or by MOVE= with absolute coordinates. See Using Options That Can Reset Other Options on page 225 for details.

  • See also: the option BOX= on page 215.

  • Featured in: Example 6. Enhancing Titles on page 238.

  • Not supported by: Java, ActiveX

BOX=1...4

BO=1...4

  • draws a box around one line of text. A value of 1 produces the thinnest box lines; 4 produces the thickest. Boxing angled text does not produce an angled box; the box is sized to include the angled text.

  • The color of the box is either:

    • the color specified by the COLOR= option in the statement

    • the default text color.

  • COLOR= affects only the frame of the box. To color the background of the box, use BCOLOR=.

  • You can include more than one text string in the box as long as no text break occurs between the strings; that is, you cannot use JUSTIFY= to create multiple lines of text within a box.

  • To draw a box around multiple lines of text, you can either

    • Use MOVE= with relative coordinates to position the lines of text where you want them and enclose them with BOX=. For example, this statement produces the boxed note shown in Figure 7.27 on page 216:

       note font=swiss justify=center box=3     'Office Hours'      move=(40pct,-12pct) '9-5'; 

      click to expand
      Figure 7.27: Using the BOX= Option and the MOVE= Option to Box Multiple Lines of Text

    • Use the DRAW= option to draw the box and do not use BOX=.

  • Note: BOX= may be reset by ANGLE= or JUSTIFY=, or by MOVE= with absolute coordinates. See Using Options That Can Reset Other Options on page 225 for details.

  • See also: the options BCOLOR= on page 215, BLANK= on page 215, and BSPACE= on page 216.

  • Featured in: Example 6. Enhancing Titles on page 238

  • Not supported by: Java, ActiveX

BSPACE= box-space < units >

BS= box-space < units >

  • specifies the amount of space between the boxed text and the box. The space above the text is measured from the font maximum, and the space below the text is measured from the font minimum. By default, BSPACE=1. If BOX= is not used, BSPACE= is ignored.

  • The spacing is uniform around the box. For example, BSPACE=.5IN leaves one-half inch of space between the text and the top, bottom, and sides of the box.

  • Note: BSPACE= may be reset by ANGLE= or JUSTIFY=, or by MOVE= with absolute coordinates. See Using Options That Can Reset Other Options on page 225 for details.

  • See also: the option BOX= on page 215.

  • Not supported by: Java, ActiveX

COLOR= color

C= color

  • specifies the color for the following text, box, or line. COLOR= affects all text, lines, and boxes that follow it and stays in effect until another COLOR= specification is encountered .

  • Change colors as often as you like. For example, this statement produces a title with red text in a box with a blue frame and a cream background:

     title color=red 'Total Sales' color=blue    box=3 bcolor=cream; 
  • Although BCOLOR= controls the background color of the box, the frame color is controlled with the COLOR= that precedes BOX=.

  • If you omit COLOR=, a color specification is searched for in this order:

    1. the CTITLE= option in a GOPTIONS statement

    2. the CTEXT= option in a GOPTIONS statement

    3. the default, the first color in the colors list.

  • See also: the option BCOLOR= on page 215. Controlling Titles and Footnotes with ODS Output on page 492

DRAW=( x,y ..., x-n,y-n )< units >

D=( x,y ..., x-n , y-n )< units >

  • draws lines anywhere on the graphics output area using x and y as absolute or relative coordinates. The following table shows the specifications for absolute and relative coordinates:

    Absolute Coordinates

    Relative Coordinates

    x<units>

    ± x<units>

    y<units>

    ± y<units>

  • The coordinate position (0,0) is the lower-left corner of the graphics output area. Specify at least two coordinate pairs. Commas between coordinates are optional; blanks can be used instead. DRAW= does not affect the positioning of text.

  • The starting point for lines specified with relative coordinates begins at the end of the most recently drawn text or line in the current statement. If no text or line has been drawn in the current statement, a warning is issued and the relative draw is measured from where a zero-length text string would have ended, given the normal placement for the statement.

  • You can mix relative and absolute coordinates. For example, DRAW=(+0,+0,+0,1IN) draws a vertical line from the end of the text to one inch from the bottom of the graphics output area.

  • Not supported by: Java, ActiveX

FONT= font

F= font

  • specifies the font for the subsequent text. See Chapter 5, SAS/GRAPH Fonts, on page 75 for details on specifying SAS/GRAPH fonts. If you omit this option, a font specification is searched for in this order:

    • for a TITLE1 statement

      1. the FTITLE= option in a GOPTIONS statement

      2. the FTEXT= option in a GOPTIONS statement

      3. the default font, SWISS (COMPLEX in Release 6.06 and earlier).

    • for all other TITLE statements and the FOOTNOTE and NOTE statements:

      1. the FTEXT= option in a GOPTIONS statement

      2. the default hardware font, NONE.

  • Note: Font names greater than eight characters in length must be enclosed in quotation marks.

  • Note: If the TITLE or FOOTNOTE is being output through an ODS markup destination and the corresponding NOGTITLE or NOGFOOTNOTE option is specified, then the bold and italic FONT attributes are on by default. However, if you specify different attributes with the FONT= option, the bold and italic attributes are turned off.

  • See also: Controlling Titles and Footnotes with ODS Output on page 492

  • Featured in: Example 6. Enhancing Titles on page 238.

HEIGHT= text-height < units >

H= text-height < units >

  • specifies the height of text characters in number of units. By default, HEIGHT=1. Height is measured from the font minimum to the capline. Ascenders may extend above the capline, depending on the font.

  • If your text line is too long to be displayed in the height specified in HEIGHT=, the height specification is reduced so that the text can be displayed. A note in the SAS log tells you what percentage of the specified size was used.

  • If you omit HEIGHT=, a text height specification is searched for in this order:

    • for a TITLE1 statement:

      1. the HTITLE= option in a GOPTIONS statement

      2. the HTEXT= option in a GOPTIONS statement

      3. the default value, 2.

      By default, a TITLE1 title is twice the height of all other titles.

    • for all other TITLE statements and the FOOTNOTE and NOTE statements:

      1. the HTEXT= option in a GOPTIONS statement

      2. the default value, 1.

  • Note: The Java applet and ActiveX control allow you to control the relative height of text with the HEIGHT= option, but not the absolute height in terms of specific units.

  • See also: Controlling Titles and Footnotes with ODS Output on page 492

  • Featured in: Example 1. Ordering Axis Tick Marks with SAS Datetime Values on page 226 and Example 6. Enhancing Titles on page 238.

  • Not supported by: Java (partial), ActiveX (partial)

JUSTIFY=LEFT CENTER RIGHT

J=L C R

  • specifies the alignment of the text string. The default depends on the statement with which you use JUSTIFY=:

    • for a FOOTNOTE statement the default is CENTER

    • for a NOTE statement the default is LEFT

    • for a TITLE statement the default is CENTER.

  • All the text strings following JUSTIFY= are treated as a single string and are displayed as one line that is left-, right-, or center-aligned.

  • You can change the justification within a single line of text. For example, this NOTE statement displays a date on the left side of the output and the page number on the same line on the right:

     note June 28, 1997 justify=right Page 3; 

    In addition, you can use JUSTIFY= to produce multiple lines of text by repeating JUSTIFY= with the same value before the text string for each line. Multiple lines of text with the same justification are blocked together. For example, this TITLE statement produces a three-line title with each line right-justified:

     title justify=right 'First Line'        justify=right 'Second Line'        justify=right 'Third Line'; 

    You can get the same effect with three TITLE statements, each specifying JUSTIFY=RIGHT. If you produce a block of text by specifying the same justification for multiple text strings, and then change the justification for an additional text string, that text is placed on the same line as the first string specified in the statement.

  • Note: Using JUSTIFY= after one text string and before another can reset some options to their default values. See Using Options That Can Reset Other Options on page 225 for details.

  • Featured in: Example 3. Rotating Plot Symbols through the Colors List on page 231.

LANGLE= degrees

LA= degrees

  • specifies the angle of the baseline of the entire text string(s) with respect to the horizontal. A positive value for degrees moves the baseline counterclockwise; a negative value moves it clockwise. By default, LANGLE=0 (horizontal).

  • Angled titles or footnotes may require more vertical space and consequently may increase the size of the title area or the footnote area, thereby reducing the vertical space in the procedure output area.

  • Using BOX= with angled text does not produce an angled box; the box is sized to accommodate the angled note.

  • Unlike ANGLE=, LANGLE= does not reset any other options. Therefore, LANGLE= is easier to use because you do not need to repeat options after a text break.

  • LANGLE= has the same effect on the text as ANGLE=, except when an angle of 90 degrees or -90 degrees is specified. The result depends on the statement in which you use the option:

    • With the TITLE statement:

      Figure 7.28 on page 219 shows how LANGLE=90 degrees and LANGLE=-90 degrees positions and rotates titles.

      click to expand
      Figure 7.28: Positioning Titles with the LANGLE= Option

      • LANGLE=90

        • angles the title 90 degrees (counterclockwise) so that it reads from bottom to top. The title is centered horizontally and positioned at the top of the picture.

      • LANGLE=-90

        • angles the title -90 degrees (clockwise) so that it reads from top to bottom. The title is centered horizontally and positioned at the top of the picture.

    • With the FOOTNOTE statement:

      Figure 7.29 on page 220 shows how LANGLE=90 degrees and LANGLE=-90 degrees positions and rotates footnotes.

      click to expand
      Figure 7.29: Positioning Footnotes with the LANGLE= Option

      • LANGLE=90

        • angles the footnote 90 degrees (counterclockwise) so that it reads from bottom to top. The footnote is centered horizontally and positioned as the bottom of the picture.

      • LANGLE=-90

        • angles the footnote -90 degrees (clockwise) so that it reads from top to bottom. The footnote is centered horizontally and positioned at the bottom of the picture.

    • With the NOTE statement:

      Figure 7.30 on page 220 shows how LANGLE=90 degrees and LANGLE=-90 degrees positions and rotates notes.

      click to expand
      Figure 7.30: Positioning Notes with the LANGLE= Option

      • LANGLE=90

        • positions the note at the top of the left edge of the procedure output area, angled 90 degrees (counterclockwise) so that it reads from bottom to top.

      • LANGLE=-90

        • positions the note at the top of the left edge of the procedure output area, angled “90 degrees (clockwise) so that it reads from top to bottom.

  • See also: the option ANGLE= on page 213.

  • Not supported by: Java, ActiveX

LINK= url

  • specifies a uniform resource locator (url) that a title or footnote links to.

  • The text-string that you use to specify the url can contain occurrences of the variables #BYVAL, #BYVAR, and #BYLINE, as described in text-string on page 222.

  • Note: If the title or footnote is being output through an ODS markup destination (such as HTML) and the corresponding ODS option NOGTITLE or NOGFOOTNOTE is specified, then the title or footnote is rendered in the body of the HTML file rather than in the graphic itself. Specifying NOGTITLE or NOGFOOTNOTE results in increasing the amount of space allowed for the procedure output area, which can result in increasing the size of the graph. Space that would have been used for the title or footnote is devoted instead to the graph. You might need to be aware of this possible difference if you are using annotate or map coordinates.

  • See also: Controlling Where Titles and Footnotes are Rendered on page 492

LSPACE= line-space < units >

LS= line-space < units >

  • specifies the amount of spacing above lines of note and title text and the amount of spacing below lines of footnote text. For notes and titles, the spacing is measured from the capline of the current line to the font minimum of the line above. For footnotes, the spacing is measured from the font minimum of the current line to the capline of the line below. By default, LSPACE=1.

  • Note: LSPACE= may be reset by ANGLE= or JUSTIFY=, or by MOVE= with absolute coordinates. See Using Options That Can Reset Other Options on page 225 for details.

  • Not supported by: Java, ActiveX

MOVE=( x , y )< units >

M=( x , y )< units >

  • positions subsequent text or lines anywhere on the graphics output area using x and y as absolute or relative coordinates. The following table shows the specifications for absolute and relative coordinates:

    Absolute Coordinates

    Relative Coordinates

    x<units>

    ± x<units>

    y<units>

    ± y<units>

  • Commas between coordinates are optional; you can use blanks instead.

  • The starting point for lines specified with relative coordinates begins with the end of the most recently drawn text or line in the current statement. If no text or line has been drawn in the current statement, a warning is issued and the relative move is measured from where a zero-length text string would have ended, given the normal placement for the statement. You can mix relative and absolute coordinates.

  • MOVE= overrides a JUSTIFY= specified for the same text string.

  • If a NOTE, FOOTNOTE, or TITLE statement uses MOVE= to position the text so that the statement does not use its default position, the text of the next NOTE, FOOTNOTE, or TITLE statement occupies the unused position and no blank lines are displayed.

  • Note: If you specify MOVE= with at least one absolute coordinate and if the option follows one text string and precedes another, some options can be reset to their default values. See Using Options That Can Reset Other Options on page 225 for details.

  • Featured in: Example 2. Specifying Logarithmic Axes on page 229 and Example 6. Enhancing Titles on page 238

  • Not supported by: Java, ActiveX

ROTATE= degrees

R= degrees

  • specifies the angle at which each character of text is rotated with respect to the baseline of the text string. The angle is measured from the current text baseline angle, which is specified by ANGLE= or LANGLE=. By default, the baseline is horizontal. A positive value for degrees rotates the character counterclockwise; a negative value rotates it clockwise. By default, ROTATE=0 (parallel to the baseline).

  • Figure 7.31 on page 222 shows how characters are positioned when ROTATE=90 is used with the default (horizontal) baseline.

  • See also: the option ANGLE= on page 213.

  • Featured in: Example 6. Enhancing Titles on page 238.

  • Not supported by: Java, ActiveX

text-string(s)

  • is one or more strings up to 200 characters. You must enclose text strings in single or double quotation marks. The text appears exactly as you type it in the statement, including uppercase and lowercase characters and blanks.

  • To use single quotation marks or apostrophes within the title, you can either

    • use a pair of single quotation marks together:

       footnote 'All''s Well That Ends Well'; 
    • enclose the text in double quotation marks:

       footnote "All's Well That Ends Well"; 
  • Because FOOTNOTE, NOTE, and TITLE statements concatenate all text strings, the strings must contain the correct spacing. With a series of strings, add blanks at the beginning of a text string rather than at the end, as in this example:

     note color=red 'Sales:' color=blue ' 2000'; 
  • With some fonts, you produce certain characters by specifying a hexadecimal value. A trailing x identifies a string as a hexadecimal value. For example, this statement* produces the title Profits Increase & pound ; 3,000 :

     title font=swiss 'Profits Increase ' '18'x '3,000'; 
  • For more information see Specifying Special Characters on page 81. In addition, you can embed one or more of the following in the string:

    • #BYLINE

      • substitutes the entire BY line without leading or trailing blanks for #BYLINE in the text string, and displays the BY line in the footnote, note, or title produced by the statement.

    • #BYVAL n #BYVAL( BY-variable- name )

      • substitutes the current value of the specified BY variable for #BYVAL in the text string and displays the value in the footnote, note, or title produced by the statement. Specify the variable with one of these:

        n

        specifies which variable in the BY statement #BYVAL should use. The value of n indicates the position of the variable in the BY statement. For example, #BYVAL2 specifies the second variable in the BY statement.

        BY-variable-name

        names the BY variable. For example, #BYVAL(YEAR) specifies the BY variable, YEAR. Variable-name is not case sensitive.

      • Featured in: Example 7. Using BY- group Processing to Generate a Series of Charts on page 240 and Example 9. Combining Graphs and Reports in a Web Page on page 248.

    • #BYVAR n #BYVAR( BY-variable-name )

      • substitutes the name of the BY-variable or label associated with the variable (whatever the BY line would normally display) for #BYVAR in the text string and displays the name or label in the footnote, note, or title produced by the statement. Specify the variable with one of these:

        n

        specifies which variable in the BY statement #BYVAR should use. The value of n indicates the position of the variable in the BY statement. For example, #BYVAR2 specifies the second variable in the BY statement.

        BY-variable-name

        names the BY variable. For example, #BYVAR(SITES) specifies the BY variable, SITES. Variable-name is not case sensitive.

      • A BY variable name displayed in a title, note, or footnote is always in uppercase. If a label is used, it appears as specified in the LABEL statement.

        For more information , see Substituting BY Line Values in a Text String on page 226 .

UNDERLIN=0...3

U=0...3

  • underlines subsequent text. Values of 1, 2 and 3 underline with an increasingly thicker line. UNDERLIN=0 halts underlining for subsequent text.

  • Underlines follow the text baseline. If you use an LANGLE= or ANGLE= option for the line of text, the underline is drawn at the same angle as the text. Underlines do not break up to follow rotated characters. See the option ROTATE= on page 222.

  • To make the text and the underline the same color, specify a COLOR= before the UNDERLIN= that precedes the text string. To make the text a different color, specify COLOR= after the UNDERLIN=.

  • Note: UNDERLIN= may be reset by ANGLE= or JUSTIFY=, option, or by the MOVE= option with absolute coordinates. See Using Options That Can Reset Other Options on page 225 for details.

  • Note: The Java applet and ActiveX control underline text when UNDERLIN= is specified, but they do not vary the thickness of the line.

  • Featured in: Example 6. Enhancing Titles on page 238

  • Not supported by: Java (partial), ActiveX (partial)

Using TITLE and FOOTNOTE Statements

You can define TITLE and FOOTNOTE statements anywhere in your SAS program. They are global and remain in effect until you cancel them or until you end your SAS session. All currently defined FOOTNOTE and TITLE statements are automatically displayed.

You can define up to ten TITLE statements and ten FOOTNOTE statements in your SAS session. A TITLE or FOOTNOTE statement without a number is treated as a TITLE1 or FOOTNOTE1 statement. You do not have to start with TITLE1 and you do not have to use sequential statement numbers . Skipping a number in the sequence leaves a blank line.

You can use as many text strings and options as you want, but place the options before the text strings they modify. See Using Multiple Options on page 224.

The most recently specified TITLE or FOOTNOTE statement of any number completely replaces any other TITLE or FOOTNOTE statement of that number. In addition, it cancels all TITLE or FOOTNOTE statements of a higher number. For example, if you define TITLE1, TITLE2, and TITLE3, resubmitting the TITLE2 statement cancels TITLE3.

To cancel individual TITLE or FOOTNOTE statements, define a TITLE or FOOTNOTE statement of the same number without options (a null statement):

 title4; 

But remember that this will cancel all other existing statements of a higher number.

To cancel all current TITLE or FOOTNOTE statements, use the RESET= graphics option in a GOPTIONS statement:

 goptions reset=footnote; 

Specifying RESET=GLOBAL or RESET=ALL also cancels all current TITLE and FOOTNOTE statements as well as other settings.

Using the NOTE Statement

NOTE statements are local, not global, and they must be defined within a procedure or RUN-group with which they are used. They remain in effect for the duration of the procedure that includes NOTE statements in any of its RUN-groups or until you end your SAS session. All notes defined in the current RUN group, as well as those defined in previous RUN-groups, are displayed in the output as long as the procedure remains active.

You can use as many text strings and options as you want, but place the options before the text strings they modify. See Using Multiple Options on page 224.

Using Multiple Options

In each statement you can use as many text strings and options as you want, but you must place the options before the text strings they modify. Most options affect all text strings that follow them in the same statement, unless the option is explicitly reset to another value. In general, TITLE, FOOTNOTE, and NOTE statement options stay in effect until one of these events occurs:

  • the end of the statement is reached

  • a new specification is made for that option.

For example, this statement specifies that one part of the note be red and another part blue, but the height for all the text is 4:

 note height=4 color=red 'Red Tide'       color=blue ' Effects on Coastal Fishing'; 

Setting Defaults

You can set default characteristics for titles (including TITLE1 definitions), footnotes, and notes by using the following graphics options in a GOPTIONS statement:

CTITLE= color

  • sets the default color for all titles, footnotes, and notes; overridden by the COLOR= option in a TITLE, FOOTNOTE, or NOTE statement.

CTEXT= text-color

  • sets the default color for all text; overridden by CTITLE= for titles, footnotes, and notes.

FTITLE= title-font

  • sets the default font for TITLE1 definitions; overridden by FONT= in the TITLE1 statement.

FTEXT= text-font

  • sets the default font for all text, including the TITLE1 statement if FTITLE= is not used; overridden by the FONT= option a TITLE, FOOTNOTE, or NOTE statement.

HTITLE= height<units>

  • sets the default height for TITLE1 definitions; overridden by the HEIGHT= option in the TITLE1 statement.

HTEXT= n<units>

  • sets the default height for all text, including the TITLE1 statement if HTITLE= is not used; overridden by the HEIGHT= option a TITLE, FOOTNOTE, or NOTE statement.

See Chapter 8, Graphics Options and Device Parameters Dictionary, on page 261 for a complete description of each option.

Using Options That Can Reset Other Options

The ANGLE=, MOVE=, and JUSTIFY= options affect the position of the text and cause text breaks . (To cause a text break, MOVE= must have at least one absolute coordinate.) When a statement contains multiple text strings, the resulting text break can cause the following options to reset to their default values:

  • BCOLOR=

  • BLANK=

  • BOX=

  • BSPACE=

  • LSPACE=

  • UNDERLIN=.

Note: The LANGLE= option does not cause a text break.

If in a TITLE, FOOTNOTE, or NOTE statement, before the first text string, you use an option that can be reset (such as UNDERLIN=) and before the second string you use an option that resets it (such as JUSTIFY=), the first option does not affect the second string. In order for the first option to affect the second string, repeat the option and position it after the resetting option and before the text string.

For example, this statement produces a two-line title in which only the first line is underlined :

 title underlin=2 'Line 1' justify=left 'Line 2'; 

To underline Line 2, repeat UNDERLIN= before the second text string and after JUSTIFY=:

 title underlin=2 'Line 1' justify=left        underlin=2 'Line 2'; 

Substituting BY Line Values in a Text String

To use the #BYVAR and #BYVAL options, insert the option in the text string at the position you want the substitution text to appear. Both #BYVAR and #BYVAL specifications must be followed by a delimiting character, either a space or other nonalphanumeric character, such as the quote that ends the text string. If not, the specification is completely ignored and its text remains intact and is displayed with the rest of the string. To allow a #BYVAR or #BYVAL substitution to be followed immediately by other text, with no delimiter , use a trailing dot (as with macro variables). The trailing dot is not displayed in the resolved text. If you want a period to be displayed as the last character in the resolved text, use two dots after the #BYVAR or #BYVAL substitution.

If you use a #BYVAR or #BYVAL specification for a variable that is not named in the BY statement (such as #BYVAL2 when there is only one BY-variable or #BYVAL(ABC) when ABC is not a BY-variable or does not exist), or if there is no BY statement at all, the substitution for #BYVAR or #BYVAL does not occur. No error or warning message is issued and the option specification is displayed with the rest of the string. The graph will continue to display a BY line at the top of the page unless you suppress it by using the NOBYLINE option in an OPTION statement.

For more information, see BY Statement on page 141.

Note: This feature is not available in the Data Step Graphics Interface or in the Annotate facility since BY lines are not created in a DATA step.




SAS.GRAPH 9.1 Reference, Volumes I and II
SAS.GRAPH 9.1 Reference, Volumes I and II
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 342

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net