Help using Base SAS procedures

Proc gplot and ods pdf

Reply
Contributor
Posts: 57

Proc gplot and ods pdf

Hi,

I have a dataset with variables

AN
w_24
f_24
g_24
w_25
f_25
g_25
w_log24
f_log24
g_log24
w_log25
f_log25
g_log25

I need 4 different for each AN value. So I used this code.

proc gplot data=abc;
title "an=#byval(an)";
by an;

plot g_24*w_24 g_25*w_25 overlay/nolegend
anno=anno_markers;

plot f_24*w_24 f_25*w_25 overlay/nolegend
anno=anno_markers;

plot g_log24*w_log24 g_log25*w_log25 overlay/nolegend
anno=anno_markers;

plot f_log24*w_log24 f_log25*w_log25 overlay/nolegend
anno=anno_markers;

run;
quit;

Now I need to ods it. The constraint is to fit all the 4 plots for each AN in one page. Meaning, if there are 8 AN then I need to have 9 pages. Each page should contain all the 4 plots.

I tried ODS pdf file= startpage=n0 column=2;
goptions vsize=4in;

This gives 2 columns in each page. Each column contains 2 graphs. In the crude form it satisfies the requirements but they are in 2 different start point.

|
|
| |
| |
|
|

The alignment is not clear.

I tried ods layout column=2 rows=2;

not getting the desired result.

I tried tagsets.htmlpanel. The alignment is fine but the graph is nnot getting printed.

Please help.

Thanks,
Sandhya.
Trusted Advisor
Posts: 2,113

Re: Proc gplot and ods pdf

Check out GREPLAY to position the plots on the page and then send the results of GREPLAY to ODS.

If you are using SAS 9.2, then you may also want to consider SGPLOT as it gives you a lot of control.

Doc Muhlbaier
Duke
Contributor
Posts: 57

Re: Proc gplot and ods pdf

PROC GREPLAY with template option worked.

Thank you

Sandhya.
Ask a Question
Discussion stats
  • 2 replies
  • 157 views
  • 0 likes
  • 2 in conversation