BookmarkSubscribeRSS Feed
Sandhya
Fluorite | Level 6
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.
4 REPLIES 4
DanH_sas
SAS Super FREQ
What version of SAS are you using?
Sandhya
Fluorite | Level 6
SAS 9.2

Sandhya.
Cynthia_sas
SAS Super FREQ
Hi:
If you have SAS 9.2, then you might consider using the SGPANEL procedure to get your related graphs placed into one page in the ODS PDF destination.

Just a comment about ODS HTMLPANEL -- this is an HTML-based destination -- there is no guarantee that the printed output will "fit" in a printed page, since the printing is handled by the browser interface to the printer and SAS really has nothing to do with how the HTML prints.

There are a lot of good references on using the SGPANEL procedure from recent SAS user group meetings.

cynthia
[pre]
options orientation=landscape nodate nonumber;
ods listing close;
ods pdf file='c:\temp\panel.pdf';

proc sgpanel data=sashelp.heart;
panelby chol_status sex;
scatter x=ageatdeath y=agechddiag;
run;
ods pdf close;
[/pre]
Sandhya
Fluorite | Level 6
Hi Cynthia,

PROC GREPLAY with template option worked.

Thank you,

Sandhya.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1399 views
  • 0 likes
  • 3 in conversation