I want the ods pdf to have gridded layout.
In the sas studio window it appears gridded, but the pdf has only 1 column.
Furthermore the print includes a first title statement that shouldn't appear because the #byval1 is not resolved yet.
data cars;
set sashelp.cars;
by model notsorted;
if first.model;
run;
proc transpose data=cars out=cars_long;
by model notsorted;
var _numeric_;
run;
data cars_long;
set cars_long;
label col1="value of analyzed variable" _name_="variable";
run;
proc sort data=cars_long;
by _name_;
run;
options papersize=A4 orientation=portrait leftmargin=1cm rightmargin=1cm;
title;
ods pdf file="/caslibs/marketing/__test.pdf" style=Style.MySasWeb nogfootnote nogtitle ;
options nobyline;
ods layout gridded columns=2 advance=bygroup;
title "Histogram & kernel for #byval1";
ods region;
proc sgplot data=cars_long noautolegend;
where col1 ne .;
by _NAME_ ;
histogram col1 / dataskin=sheen ;
density col1 / type=kernel transparency=0.4;
run;
options byline;
ods layout end;
ods pdf close;
I don't know why your titles aren't working properly, this seems like a bug to me.
Your plots use the default size. If you change the plot size, then they will fit on one page.
ods graphics / height=3in width=3in;
or you can use any other height and width that works for you.
I don't know why your titles aren't working properly, this seems like a bug to me.
Your plots use the default size. If you change the plot size, then they will fit on one page.
ods graphics / height=3in width=3in;
or you can use any other height and width that works for you.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.