- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to create a pdf with 2 elements on each sheet: 1 sgplot and 1 proc print (small table), however as a result I always get the text in the graph (axis labels and title) compressed on itself, which is ugly.
I tried multiple things (resizing with ods graphic etc.) but really still don't know what I am doing wrong...
Thanks in advance for your help.
ods _all_ close;
ods escapechar = '^';
options orientation=landscape center pageno=1 nodate LEFTMARGIN=0.25in RIGHTMARGIN=0.25in TOPMARGIN=0.25in BOTTOMMARGIN=0.25in papersize=A4;
ods pdf file="whicheverpath/data.pdf" notoc startpage=never dpi=200;
ods pdf startpage=now;
proc odstext;
title "testtitle";
run;
ods layout start columns=2;
ods region column=1;
proc sgplot data=TABLE ;
series x=MONTH y=INDIC / lineattrs=(color=blue);
xaxis type=discrete valueattrs=(size=7pt) grid;
YAXIS DISPLAY=(NOLABEL) grid;
title;
run;
ods region column=2;
PROC PRINT DATA=TABLE noobs; run;
ods layout end;
ODS PDF CLOSE;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can specify a width/height on the ODS REGION statement and control it in that manner.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Can you add an image showing the compressed (squished or squashed) text ?
For instance, your code, run against SASHELP.AIR, does not exhibit any funky text renderings.
ods _all_ close;
ods escapechar = '^';
options orientation=landscape center pageno=1 nodate LEFTMARGIN=0.25in RIGHTMARGIN=0.25in TOPMARGIN=0.25in BOTTOMMARGIN=0.25in papersize=A4;
ods pdf file="2each.pdf" notoc startpage=never dpi=200;
ods pdf startpage=now;
proc odstext;
title "testtitle";
run;
ods layout start columns=2;
ods region column=1;
proc sgplot data=sashelp.air ;
series x=date y=air / lineattrs=(color=blue);
xaxis type=discrete valueattrs=(size=7pt) grid;
YAXIS DISPLAY=(NOLABEL) grid;
title;
where year(date)=1951;
run;
ods region column=2;
PROC PRINT DATA=sashelp.air noobs;
where year(date)=1951;
run;
ods layout end;
ODS PDF CLOSE;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your answer.
Even if in SAS itself the graph is shown with the right size, it is squished in the final PDF output, as you can see:
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can specify a width/height on the ODS REGION statement and control it in that manner.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
your solution worked, however I had to couple it with something else, formatting the pictures into gifs:
ods graphics on / width=17cm height=13cm outputfmt=gif;
...
ods layout start columns=2;
ods region column=1 width=17cm height=13cm;
As a result my PDF is a lot bigger in size (maybe I can try other formats and see how it goes), but at least the proportions are now correct.
Thanks again for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content