Chapter Contents |
Previous |
Next |
The GANNO Procedure |
Procedure features: |
| |||||
Sample library member: | GR12N01 |
This example uses an Annotate data set to scale data-dependent output with the DATASYS option and create a vertical bar chart of sales for each of six sites. The values that determine the height of each bar range from 137 to 999. The range of values is so large that the GANNO procedure cannot fit all of the bars in the output area without scaling the output. This program uses the DATASYS option to scale the data values so that the bars fit in the graphics output area.
goptions reset=global gunit=pct cback=white colors=(black blue green red); |
data wrldtotl; length sitename $ 10; input sitename $ 1-10 mean 12-15; datalines; Paris 999 Munich 571 Tokyo 137 London 273 Frankfurt 546 New York 991 ; run; |
data wrldanno; length function color $ 8 text $ 20; retain line 0 xsys ysys '2' hsys '3' x 8; set wrldtotl end=end; |
function='move'; x=x+8; y=20; output; function='bar'; y=y+(mean); x=x+9; style='empty'; color='red'; output; |
function='label'; y=0; x=x-4; size=3.5; position='E'; style='swiss'; color='blue'; text=sitename; output; |
function='move'; y=y+(mean)-3; output; function='label'; x=x-1; text=left(put(mean,3.)); position='5'; style='swiss'; size=3; output; |
proc ganno annotate=wrldanno datasys; run; quit; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.