Data visualization with SAS programming

gplot and powerpoint

Reply
Regular Contributor
Posts: 194

gplot and powerpoint

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;
SAS Employee
Posts: 6

Re: gplot and powerpoint

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.
Regular Contributor
Posts: 194

Re: gplot and powerpoint

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.
SAS Super FREQ
Posts: 8,645

Re: gplot and powerpoint

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
SAS Employee
Posts: 6

Re: gplot and powerpoint

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.
Valued Guide
Posts: 632

Re: gplot and powerpoint

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.
SAS Employee
Posts: 963

Re: gplot and powerpoint

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!
SAS Super FREQ
Posts: 864

Re: gplot and powerpoint

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
Regular Contributor
Posts: 194

Re: gplot and powerpoint

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?
SAS Super FREQ
Posts: 8,645

Re: gplot and powerpoint

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
Super Contributor
Posts: 291

Re: gplot and powerpoint

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.
Post a Question
Discussion Stats
  • 10 replies
  • 182 views
  • 0 likes
  • 7 in conversation