Data visualization with SAS programming

ODS output resolution

Accepted Solution Solved
Reply
Contributor
Posts: 31
Accepted Solution

ODS output resolution

Hello there,

 

I'm having an issue after I produce a graph, such as via PROC SGPLOT, and try to copy it from SAS and paste it to Mcrosoft Office products. The resoulution of the graph is great when I see it within SAS via output window but when I right-click on the graph in the SAS output window, copy and paste it to Word the picture is way less crispy compared to how I see it in SAS.

Is there a better way to copy and paste graphs from SAS to MS Office products?

 

Thanks a lot in advance,

 

Recep 


Accepted Solutions
Solution
‎05-17-2017 02:31 PM
Super User
Posts: 19,034

Re: ODS output resolution

You can also output directly to Word which is useful.

 

ods graphics / imagefmt=png height=5in width=7in;
ods rtf file='/folders/myfolders/mysample.rtf' bodytitle image_dpi=300 
    style=journal;
title 'my sample graph';

proc sgplot data=sashelp.class;
    scatter x=height y=weight / group=sex;
run;

ods rtf close;

View solution in original post


All Replies
Super User
Posts: 19,034

Re: ODS output resolution

Change the device/file type. 

 

SGPLOT should create PNG files. Try inserting the PNG files directly into your Office document. 

SAS Super FREQ
Posts: 925

Re: ODS output resolution

Also make sure you are creating them to the size you want in your office document. If you are growing/shrinking them, the image interpolation might impact the image quality.

Contributor
Posts: 31

Re: ODS output resolution

Thanks Dan!
Solution
‎05-17-2017 02:31 PM
Super User
Posts: 19,034

Re: ODS output resolution

You can also output directly to Word which is useful.

 

ods graphics / imagefmt=png height=5in width=7in;
ods rtf file='/folders/myfolders/mysample.rtf' bodytitle image_dpi=300 
    style=journal;
title 'my sample graph';

proc sgplot data=sashelp.class;
    scatter x=height y=weight / group=sex;
run;

ods rtf close;
Contributor
Posts: 31

Re: ODS output resolution

Thanks Reeza, this significantly improves the image quality!
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 194 views
  • 0 likes
  • 3 in conversation