Hi all.
I have the need to put some gkpi output on a pdf, but I'm not able to make them the right size. After a certain dimension on the pdf, the graph remain the same size, and only the white border around increae. Is there something I can do? The code I use is something like the following. Thanks 🙂
ods _all_ close;
ods escapechar="^";
ods graphics on / reset=all border=off MAXLEGENDAREA=50;
options orientation=PORTRAIT papersize=A3 /* 420x297 */
topmargin=1cm bottommargin=1cm leftmargin=1.5cm rightmargin=0.5cm
nodate center nonumber;
ODS PDF file="%quote(&outfilepath./&folder./&filenamedef..pdf)" color=yes style=customDmSintA3
STARTPAGE=no bookmarkgen=no dpi=150 nogtitle nogfootnote compress=9;
ods layout absolute y=5cm height=5.5cm;
goptions reset=goptions hsize=4cm vsize=4cm noborder;
ods region x=0cm width=9cm;
proc gkpi mode=basic;
dial actual=5 bounds=(1 10 15) /
target=8 nolowboundary
colors=(cx84AF5B cxD06959);
run;
ods region x=9cm width=9cm;
proc gkpi mode=basic;
dial actual=50 bounds=(1 60 90) /
target=40 nolowboundary
colors=(cx84AF5B cxD06959);
run;
ods region x=18cm width=9cm;
proc gkpi mode=basic;
dial actual=91 bounds=(1 180 270) /
target=100 nolowboundary
colors=(cx84AF5B cxD06959);
run;
ods layout end;
ods pdf close;
You may need to look at adjusting the height and width using the ODS graphics options:
ods graphics/ height=1in width=2in; or similar before each procedure call if you want different graphics sizes.
It seems that proc gkpi is not affected from those options 😞
Try the xpixels and ypixels on goptions instead of hsize vsize.
xpixels and ypixels behave same of the vsize... If you go down in size, the output goes smaller. But if you increae the values, just the around square of the image increase, lefting the image itself the same size... -.-"
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.