Running SAS V9.4 on Windows 7
Currently output charts to ODS PDF and then do cut/paste into MS-Word but the quality of what gets pasted into MS-Word is very poor. The ODS stuff is fairly new to me. I've picked up a book on ODS but haven't really had the time to read through. Any suggestions are appreciated.
Current code sample:
/* Create graphs for experiment ID: B6 */
goptions reset=all;
ods pdf file="'C:\Drive HDD Basic Plots\Charts - IOPS\HDD_4K_B6_IOPS_Basic .pdf' ";
option orientation=portrait nodate nonumber;
legend1 across=1 cborder=black mode=share position=(outside top right);
proc gplot data=Work.GenPlot;
where(exprid='B6');
by exprid ;
symbol1 interpol=join color=black;
symbol2 interpol=join VALUE=DIAMOND color=red;
symbol3 interpol=join color=blue;
symbol4 interpol=join VALUE=SQUARE color=gold;
symbol5 interpol=join color=green;
symbol6 interpol=join VALUE=CIRCLE color=magenta;
symbol7 interpol=join color=brown;
symbol8 interpol=join color=orange;
symbol9 interpol=join color=cyan;
symbol10 interpol=join color=charcoal;
plot avgrspms*iorate=testname /
annotate = Work.Annods_HDD_4K_B6_IOPS_Basic
legend = legend1
/* vref = 0.15 */
vaxis = axis1 haxis=axis2;
axis1 order =( 0.000 to 5.000 by 0.500 ) origin=(10.8,25) pct;
axis2 origin =(10,25) pct length=60 pct;
Title1 j= LEFT 'VSP G1000 4K Component Test: HDD Basic LDEV' ;
Title2 j= LEFT 'Response Time vs IOPS' ;
Title3 j= LEFT '(B6) Uniform I/O with 70% read, 30% write, 70% cache hit' ;
Title4 j= LEFT '4K Profile Chain Length = 1 ';
footnote1 'confidential stuff';
footnote2 ' Chart Name = HDD_4K_B6_IOPS_Basic ';
run;
ODS PDF CLOSE;
quit;
Sorry, I know I said I was using PROC SGPLOT in the heading. Somewhere along the line I changed that to the older GPLOT.
ODS RTF is essentially a word document, so try that destination instead of PDF and then transferring over.
If the code above is all, should basically be a switch from ODS PDF to ODS RTF throughout the code and change the extension of the file to .doc or .rtf.
Send your graphic output to a .PNG file and take it from there.
filename graphout "&sasforum.\Graphs"; /* destination directory */
goptions reset=all device=png gsfname=graphout xpixels=1200 ypixels=1000;
ods html close;
ods listing;
proc gplot data=sashelp.class;
plot weight*height=sex / name="myGraph";
run;
quit;
For antiliassing (better graphic quality), use SG graphics
PG
Just wanted to say thank you to both of you. I still wasn't getting a good quality image but realized that both of these were still producing something difficult to read that maybe the problem wasn't with the ODS output format. The problem really turned out to be with the default font. I changed the font and went with the png option...that alone saved me most of this weekend that would have been spent cut/pasting about 80 graphs in each of two papers.
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.