Sample 25501: Using NAME= to produce multiple graphs with PROC GANNO
This sample is from the "SAS/GRAPH Software: Reference, Version 8", Volume 1, Chapter 12.
For additional information on the sample refer to this book.
/*+-------------------------------------------------------------+
| S A S S A M P L E L I B R A R Y |
| |
| NAME: GANMULTI |
| TITLE: GANMULTI-Using NAME= to Produce Multiple Graphs |
| PRODUCT: GRAPH |
| SYSTEM: ALL |
| KEYS: GRAPHICS ANNOTATE GANNO |
| PROCS: GANNO |
| DATA: INTERNAL |
| |
| SUPPORT: GRAPHICS STAFF UPDATE: |
| REF: SAS/GRAPH REFERENCE GUIDE |
| MISC: EDIT AND UNCOMMENT THE LIBNAME STATEMENT |
| IF THE LIBREF HAS NOT BEEN DEFINED. |
+-------------------------------------------------------------+*/
/* Set the graphics environment */
goptions reset=all gunit=pct border cback=white
colors=(black blue green red)
ftitle=swissb htitle=6 ftext=swiss htext=3;
/* Create Annotate data set */
data squares;
length function style color $ 8 text $ 15;
xsys='3'; ysys='3';
/* Draw the green square */
color='green';
function='move'; x=10; y=65; output;
function='bar'; x=30; y=95; style='solid'; output;
/* Label green square */
function='label'; x=10; y=63; position='6';
style='swissb'; size=2; text='Green'; output;
/* Draw the red square */
color='red';
function='move'; x=60; y=65; output;
function='bar'; x=80; y=95; output;
/* Label red square */
function='label'; x=60; y=63; position='6';
style='swissb'; size=2; text='Red'; output;
/* Draw the blue square */
color='blue';
function='move'; x=10; y=15; output;
function='bar'; x=30; y=45; output;
/* Label blue square */
function='label'; x=10; y=12; position='6';
style='swissb'; size=2; text='Blue'; output;
/* Draw the gray square */
color='gray';
function='move'; x=60; y=15; output;
function='bar'; x=80; y=45; output;
/* Label gray square and add a footnote */
function='label'; x=60; y=12; position='6';
style='swissb'; size=2; text='Gray'; output;
/* Write footnote */
x=90; y=5; position='5'; hsys='3'; size=3;
style='swiss'; text='GANSQUAR'; output;
/* Draw a red frame */
function='frame'; color='red'; when='b'; style='empty';
output;
run;
/* Generate annotated slide, separating */
/* graphs by color */
proc ganno annotate=squares
name=color
description='Individual squares';
run;
quit;
In this example, the GANNO procedure uses the NAME= option to generate multiple graphs from one Annotate data set. Since NAME= is assigned the variable COLOR, the GANNO procedure generates separate graphics output for each value of the COLOR.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GANNO
|
| Date Modified: | 2005-07-20 03:02:43 |
| Date Created: | 2005-05-23 14:11:41 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |