Hi,
I do not manage to save my plots in a pdf file with 3x3 layout format.
It is working fine with `ods graphics` but not with `ods pdf`.
Here is a simple example.
%macro plot_hist;
%do i=1 %to 9;
data sample (keep=age);
do i = 1 to 100;
age = abs (floor (rand('triangle',0.1) * 100 ) );
output;
end;
run;
ods region;
proc sgplot data=sample;
HISTOGRAM age / binwidth=1 binstart=0 ;
TITLE "Age";
xaxis values=(0 to 100 by 1) offsetmin=.01 offsetmax=.01 ;
RUN;
%end;
%mend;
ods pdf file="&DIR_RES\desc_histo.pdf";
/*ods graphics / width=1000px height=400px;*/
ods layout start rows=3 columns=3;
%plot_hist
ods layout end;
ods _all_ close;
Thanks for your assistance
Please refer to this section to adjust the graph size of sgplot.
For example, try the following code.
ods graphics on / width=2in;
ods graphics on / height=2in;
Please refer to this section to adjust the graph size of sgplot.
For example, try the following code.
ods graphics on / width=2in;
ods graphics on / height=2in;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.