Date: Wed, 30 Nov 2005 16:36:32 -0600
Reply-To: Rob Rohrbough <Rob@ROHRBOUGH-SYSTEMS.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Rob Rohrbough <Rob@ROHRBOUGH-SYSTEMS.COM>
Subject: Re: Print a small dataset to GIF file using GSLIDE
Content-Type: text/plain; charset="us-ascii"
Paul,
I have done this, but it was a long time ago. My example starts with a text
file, generated programmatically, containing the data to be displayed:
Quarter - Year Cases Charge LOS
94Q2 128% ( 64%) 4%
94Q3 2246% 376% ( 21%)
94Q4 4% ( 25%) 10%
- All 1994 N/A N/A N/A
For whatever reason, I read a line at a time. There can be multiple groups
as above, and they have to have x blank lines in between them to read
correctly. I read this file and generate a table with GPRINT that will
occupy one of four quadrants in the final product. The other three
quadrants are filled with graphs:
title f=swissb h=5 'Percent of Change';
footnote;
proc gprint fileref=percent gout=anyxtop name='diff0001';
note
draw=( 6 ,90 95 ,90 ) /* Horizontal Lines - Titles */
draw=( 6 ,84.9 95 ,84.9)
draw=( 6 ,06 95 ,06 )
draw=( 6 ,06 6 ,90 ) /* Vertical Lines */
draw=(34 ,06 34 ,90 )
draw=(49 ,06 49 ,90 )
draw=(64 ,06 64 ,90 )
draw=(79 ,06 79 ,90 )
draw=(95 ,06 95 ,90 )
;
run;
goptions ftext=swissb;
options ls=&lineszl ps=&pageszl; * Restore landscape page size;
.
.
.
goptions reset=global gunit=pct noborder ftext=swissb htitle=6 htext=3;
proc greplay tc=tempcat igout=anyxtop nofs;
tdef newfour des='Four squares of equal size'
1/ llx=2 lly=2 ulx=2 uly=45 urx=51 ury=45 lrx=51 lry=2
color=black
2/ llx=2 lly=45 ulx=2 uly=88 urx=51 ury=88 lrx=51 lry=45
color=black
3/ llx=51 lly=45 ulx=51 uly=88 urx=100 ury=88 lrx=100 lry=45
color=black
4/ llx=51 lly=2 ulx=51 uly=45 urx=100 ury=45 lrx=100 lry=2
color=black
5/ llx=2 lly=0 ulx=2 uly=100 urx=100 ury=100 lrx=100 lry=0
;
template newfour;
/***** Next two lines are two of several generated programmatically and
inserted with %include ********/
treplay 1:diff0001 2:case0001 3:achg0001 4:alos0001 5:titl0001
name='rank0001' des='68124 1. REVCD=0250 PHARMACY ';
quit;
I omitted a lot of the production code and did not take time to fill in the
gaps. If this is insufficient, I will try to add to it or simplify it for
an example. While it may not show in this snippet, I did use an annotate
dataset, but I believe, for the associated graphs.
If I had to do this again, I might look into ODS to combine the table and
the graphs.
For now I hope this gives you enough so you can proceed,
Rob Rohrbough
Omaha, NE
> -----Original Message-----
> From: Paul Walker [mailto:walker.627@OSU.EDU]
> Sent: Wednesday, November 30, 2005 1:43 PM
> Subject: Print a small dataset to GIF file using GSLIDE
>
>
> I have a small dataset (say 5 rows by 3 columns) which I would like to
> print to a graphics file using GSLIDE and then combine using
> greplay with
> a related graph. Does anyone know if this is possible and
> have some code
> that would illustrate how to do so? Would it require
> annotate datasets to
> be involved?
>
|