Sample 25498: Drawing a circle of stars using PROC GANNO
This sample is from the "SAS/GRAPH Software: Reference, Version 8", Volume 1, Chapter 10.
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: GANCIRCL |
| TITLE: GANCIRCL-Drawing a Circle of Stars |
| PRODUCT: GRAPH |
| SYSTEM: ALL |
| KEYS: GRAPHICS ANNOTATE |
| PROCS: GANNO |
| DATA: INTERNAL |
| |
| SUPPORT: GRAPHICS STAFF UPDATE: |
| REF: SAS/GRAPH REFERENCE GUIDE |
| MISC: |
| |
+-------------------------------------------------------------+*/
/* Set the graphics environment */
goptions reset=all cback=white colors=(black);
data flag;
length function color style $ 8 text $ 30;
retain xsys ysys hsys '3';
/* Draw the frame */
function='frame'; output;
/* Define the footnote */
function='label'; x=92; y=5; text='GANCIRCL';
style='swiss'; size=3; position='5'; output;
/* Define the title */
x=50; y=90; text='Flag of Micronesia';
style='swissb'; size=6; output;
/* Draw the background */
function='move'; x=20; y=30; output;
function='bar'; x=80; y=80; color='blue';
line=3; style='solid'; output;
/* Draw the circle of stars */
do star_ang=0 to 270 by 90;
function='piecntr'; x=50; y=55; size=15; output;
function='piexy'; size=1; angle=star_ang; output;
function='cntl2txt'; output;
function='symbol'; style='marker'; text='V';
angle=0; color='white'; size=10; x=.; y=.;
output;
end;
run;
/* Generate the output from */
/* the Annotate data set */
proc ganno annotate=flag;
run;
quit;

This example shows how to use an Annotate data set to draw a flag that is composed of a rectangle and four stars.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GANNO
|
| Date Modified: | 2005-07-20 03:02:43 |
| Date Created: | 2005-05-23 14:11:29 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |