LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 6 Jan 2010 15:56:31 -0500
Reply-To:   Joe Whitehurst <joewhitehurst@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Joe Whitehurst <joewhitehurst@GMAIL.COM>
Subject:   Easy SAS/Graph Templates
Content-Type:   text/plain; charset=ISO-8859-1

Here is a Macro that will help you develop SAS/Graph templates,i.e.,devices that will enable you to easily place numerous SAS/Graph Procedure/Annotate outputs on one page. This particular example produces 52 cells (some might think it's a year's worth) on a single page enabling you to exploit Tufte's notion of "small multiples" ( http://www.infovis-wiki.net/index.php?title=Small_Multiples). I once had a client with a large electrostatic printer (500 feet rolls of paper) who had 7 IBM mainframes. My mission was to produce a monthly computer resource utilization "book" from SMF-RMF records (before the days of MICS). My solution was graphical, and I used a SAS/Graph template with 999 cells that could be plotted in one pass with the giant electrostatic printer. Enjoy.

%macro generate_template; proc greplay nofs; igout gcat1.test1; gout gcat1.test1; tc gcat1.template1; tdef test2 des="52 Weeks Plus Title" 1/llx=0 lly=0 ulx=0 uly=100 urx=100 ury=100 lrx=100 lry=0 color=black

%let x=0; %let y=95; %let x_inc=25; %let y_inc=7; %do i=2 %to 53 %by 4; %do j=0 %to 4; %let panel=%sysevalf(&i+&j);

%let llx=%sysevalf(&x); %let ulx=%sysevalf(&x); %let urx=%sysevalf(&x + &x_inc); %let lrx=%sysevalf(&x + &x_inc);

%let uly=%sysevalf(&y); %let ury=%sysevalf(&y); %let lly=%sysevalf(&y - &y_inc); %let lry=%sysevalf(&y - &y_inc); &panel/llx=&llx lly=&lly ulx=&ulx uly=&uly urx=&urx ury=&ury lrx=&lrx lry=&lry

color=black %let x=%sysevalf(&x + &x_inc); %end; %let x=0; %let y=%sysevalf(&y - &y_inc); %end; ; run; quit; %mend; %generate_template; run;


Back to: Top of message | Previous page | Main SAS-L page