Reputation: 3
Trying to put multiple graphs(from proc sgplot) into one page PDF with SAS and need your kind help. Any good solution please?
Since the graphs are created using proc sgplot, no results are stored in SAS catolog, which makes proc greplay not work. And I also tried to store png in disc and read them back to SAS and then ran greplay. However quality of the graphs deteriorate during it.
It's for a big report and needs refresh weekly, manual work will be a disaster...
Thank you.
Upvotes: 0
Views: 4295
Reputation: 61
I have tried this before and found it to be pretty buggy, but if you are interested in giving it a try, this is supposed to do what you are asking for. Just change x, y, width, and height to fit the sizes you want for each region.
ods pdf file='file.pdf' startpage=no;
ods layout start width=8in height=10.5in; /*identify width and height of entire page leaving room for margins*/
ods region x=0in width=2.25in y=0in height=5in; /*identify region boundaries*/
{code with output}
ods region x=2.5in width=2.25in y=0in height=5in; /*identify region boundaries*/
{code with output}
ods region x=5in width=2.25in y=0in height=5in; /*identify region boundaries*/
{code with output}
ods region x=0in width=8in y=5.25in height=5in; /*identify region boundaries*/
{code with output}
ods layout end;
x=horizontal starting point
width=width of region (x+width=horizontal ending point)
y=vertical starting point
height=height of region (y+height=vertical ending point)
Upvotes: 0
Reputation: 12465
Look at the startpage=
option on the ODS statement. Specifically, startpage=no
will only start a new page when the current one is full. startpage=yes
is the default and starts a new page on each PROC boundary.
Upvotes: 1