![]() Chapter Contents |
![]() Previous |
![]() Next |
| POSITION Variable |
| Type: | character |
| Length: | 1 |
| Default: | 5 |
| Syntax | |
| Details | |
| Stacking text strings | |
| Positioning numeric labels | |
| Changing attributes in the middle of a text string | |
Syntax |
| POSITION='text-position' | '0'; |
| Horizontal Position > Vertical Position V | Right Aligned | Centered | Left Aligned | |
|---|---|---|---|---|
| One cell above | 1 | 2 | 3 | |
| Centered | 4 | < | 5 | + | 6 | > | |
| One cell below | 7 | 8 | 9 | |
| Half cell above | A | B | C | |
| Half cell below | D | E | F | |
These positions are illustrated in Effect of POSITION Values on Text Strings.
| Details |
To stack text strings, specify a different position value of each string. Combining POSITION Values to Stack Text shows two ways to stack text.
Combining POSITION Values to Stack Text
Note:
You cannot stack <, +, and > positions as you can 4, 5, and 6
positions. ![[cautend]](../common/images/cautend.gif)
Effect of POSITION Values on Text Strings
0 is a special value to use when you want to pause and then continue a text string. With this value you can change colors, fonts, and so on in the middle of a line, while retaining the exact position of the text at the pause. When POSITION='0', the combined text string is left-justified beginning at the point that is defined by the X and Y variables. However, you must define missing values for X and Y for the continuation string. The following Annotate data set changes the font in the middle of the string. The result is shown in Using POSITION='0' to Change the Attributes of a Text String.
data anno;
length style $ 8 text $ 12;
xsys='3'; ysys='3'; hsys='3'; x=5; y=50;
style='swissb'; size=10; text='This is the';
position='0'; output;
x=.; y=.; style='swissbi'; text=' ITALIC font';
output;
run;
Using POSITION='0' to Change the Attributes of a Text String
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.