Hi All,
Is it possible that in EG 4.3 (connecting to linux SAS 9.3) , when you use ODS PDF and ODS Graphics you do not get a vector image in the pdf by default?
As I understand it, in 9.3 ODS graphics supports scalable vector graphics.
And docs say the default for ODS PDF is SVG.
When I run the following code in 9.3 on XP, I get a vector image. But when I run it on EG (4.3) connecting to Linux session (9.3.1M2) I get a .png image (I suspect).
%let out=~/Junk;
ods graphics on /reset=all scale=on; ods listing close; ods pdf file="&out/EGpdf.pdf" style=htmlblue; proc sgplot data=sashelp.cars; histogram msrp; density msrp; run; ods pdf close; ods listing;
I tried adding imagefmt=STATIC to the ODS graphics statement, but no change. Then added imagefmt=PDF to the ods graphics statement and bingo it worked.
Which leaves me curious as to why I'm not getting a vector image by default. Is EG somehow setting a different default for imagefmt? Or is Linux using a different default? Or something else?
That said, so far I'm loving these vector images. Only bummer is that I'm stuck with IE for work, and looks like Microsoft isn't in any rush to support them. So my current thought is imagefmt=PDF for pdf with vector images, imagefmt=emf for editable vector images that will end up in PowerPoint/Word (at least until 9.4 introduce PowerPoint destination), and imagefmt=png for html. Would be happy to hear any thoughts on that general approach.
Thanks,
--Q.
Check the log for your code. EG typically puts some wrappers on the code you write and it may be causing the effect you see. The ODS graphics part of the wrapper would be based on the graphics settings you have in tools --> options.
Doc Muhlbaier
Duke
Thanks Doc, But I don't think that's it. It looks to me like all of the wrapper has to do with traditional SAS/GRAPH options. I don't see anything there about ODS graphics. And in any case, would think my use of ODS graphics / reset=all should have fixed the problem if it were just wrapper code doing something I don't like. Below is log with wrapper shown. .
1 ;*';*";*/;quit;run; 2 OPTIONS PAGENO=MIN; 3 %LET _CLIENTTASKLABEL='Program'; 4 %LET _CLIENTPROJECTPATH='/home/.../Junk/tempcode.sas.egp'; 5 %LET _CLIENTPROJECTNAME='tempcode.sas.egp'; 6 %LET _SASPROGRAMFILE=; 7 8 ODS _ALL_ CLOSE; 9 OPTIONS DEV=PNG; 10 GOPTIONS XPIXELS=0 YPIXELS=0; 11 ODS LISTING GPATH=&sasworklocation; 12 FILENAME EGHTML TEMP; 13 ODS HTML(ID=EGHTML) FILE=EGHTML ENCODING='utf-8' STYLE=Analysis 13 ! STYLESHEET=(URL="file:///C:/Program%20Files/SAS/EnterpriseGuide/4.3/Styles/Analysis.css") NOGTITLE NOGFOOTNOTE 13 ! GPATH=&sasworklocation; NOTE: Writing HTML(EGHTML) Body file: EGHTML 14 15 GOPTIONS ACCESSIBLE; 16 ods graphics on /reset=all scale=on; 17 ods listing close; 18 ods pdf file="&out/EGpdf.pdf" style=htmlblue; NOTE: Writing ODS PDF output to DISK destination "/home/.../Junk/EGpdf.pdf", printer "PDF". 19 proc sgplot data=sashelp.cars; 20 histogram msrp; 21 density msrp; 22 run;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.