BookmarkSubscribeRSS Feed
gzr2mz39
Quartz | Level 8
I'm inserting the png file into powerpoint that is created by this code.
The image quality is decent.
Does anyone have any recommendations on how I can make the image quality sharper?
Thank you.

goptions reset=all;
ods listing close;
ODS HTML path="C:\Documents and Settings\Output" (URL=NONE)
body="plots.htm"
(no_top_matter)
style=sasweb;
title;footnote;symbol;
symbol1 pointlabel=("#year_sum" h=2.5) i=join color=blue value=dot;
title1 h=4 color=VIGB "Number of Falls";
axis1 color=daggr minor=none order=(0 to 20 by 2) label=(h=3) value=(h=3);
axis2 color=daggr label=(h=3) minor=none value=(h=3);
proc gplot data=gstairs1;
plot year_sum*ydoi /
vaxis=axis1 autovref
haxis=axis2 autohref
des="Year" name="Year"
;
run;quit;
10 REPLIES 10
HPatel_SAS
SAS Employee
Based on the options you are using, you should be able to use dev=acitvex.
You can right mouse on the control, copy and paste it into ppt. In presentation mode it should be a live activex control.
gzr2mz39
Quartz | Level 8
That works well.
However, I'm wondering if there are any options that I can use to make a really sharp (ie clear) image in powerpoint?
Are you telling me that activex produces the sharpest image?
Thank you.
Cynthia_sas
SAS Super FREQ
Hi:
Besides changing the DEVICE= option, you might also want to allow the style template to control the size of the fonts by removing the explicit h=3 that you have several places in your code. You could experiment with different STYLE= options, like STYLE=ANALYSIS or STYLE=STATISTICAL or STYLE=JOURNAL to see whether the default fonts/sizes used in those style templates was more to your liking.

cynthia
HPatel_SAS
SAS Employee
You are not creating an image with activex device but a native com object. Scaling within ppt won't have any impact on resolution of the graph. One thing someone pointed out to me was that you won't get title as part of the graph when you copy and past it in ppt.
ArtC
Rhodochrosite | Level 12
You may also see improved quality by importing your file into PPT as a picture rather than using the paste buffer. The paste buffer can do some unfortunate things to graph quality.
GraphGuy
Meteorite | Level 14
Note that one issue to consider if/when using device=activex output in your ppt is that the computer you're displaying/viewing the ppt on will need to have the SAS/Graph Activex Control installed, in order to render & view the graph (ie, to display it in your powerpoint presentation).

You probably have it installed on your PC, but just didn't want this to catch you by surprise if you might be eventually showing the ppt on a different computer sometime!
DanH_sas
SAS Super FREQ
One clarification:

For you to activate and work with the activex control on a powerpoint, you must have the control installed as Robert said. However, if you design your powerpoint on your machine with the control and want to take it somewhere else to view it, you can do this without having to install the control on the other machine because the last displayed image of the control is persisted with your saved powerpoint.

Thanks!
Dan
gzr2mz39
Quartz | Level 8
OK. Thanks for the info. This is a good idea.
Another idea that I have been looking into is using ods rtf. This appears to provide good image quality and the ability to ungroup the plot so that titles can be changed in powerpoint. Are there any downsides to this?
Cynthia_sas
SAS Super FREQ
Hi:
When you use ODS RTF the image is embedded in the RTF file as an RTF image. When Word opens the RTF file, the image is rendered in the Word processor. As far as I know, you cannot directly open an RTF file with PowerPoint -- but must first open the RTF file with Word and then cut and paste from Word into PowerPoint.

If you like the look of the RTF image, the default DEVICE used for ODS RTF is the SASEMF device for SAS/GRAPH device based graphics
http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#/documentation/cd... (but other devices are listed on the above page)

This page lists the supported devices for the template-based graphics (such as the SG procedures and the GTL)
http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/odsgraphicsstmt.htm#a002589939 (shows PNG, JPEG and JFIF for RTF)

Something else to consider would be to create your graph without a title in the first place and just use PowerPoint's title area for your title.

cynthia
Bill
Quartz | Level 8
It's been quite some time since I've made powerpoint ready graphs. When I did, I used the cgm driver to create a file and then imported that into PP. That was the best method then. I note that it is still referenced in http://support.sas.com/techsup/technote/ts674/ts674.html. Regardless of the method you choose, the document is worth reading.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 1660 views
  • 0 likes
  • 7 in conversation