LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2009, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 30 Jun 2009 10:04:48 -0400
Reply-To:   Chang Chung <chang_y_chung@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Chang Chung <chang_y_chung@HOTMAIL.COM>
Subject:   Re: How to high resolution ODS graphics images for PowerPoint
Comments:   To: Richard Hoskins <richard.hoskins@DOH.WA.GOV>

On Mon, 29 Jun 2009 17:09:43 -0400, Richard Hoskins <richard.hoskins@DOH.WA.GOV> wrote:

>SAS 9.2, Once I get an ODS graphics image in the Results window I need to >save that image for importinging into WORD or PowerPoint. But the only >options appear to be bmp or png. The png image is not of high enough >resolution that it looks OK in a Powerpoint slide. > >1) How can I save the image to a higher resolution? more dots/cm >2) Can the results window image be saved to other formats? (GIF) especially >to a vector format (EMF) ?

Hi,

Unlike the old sas graphics system, the new statistics graphic proc's (or sg procs) generate images directly. And it chooses appropriate image format for the active ods destination.

If you generate raster images, then you can use the image_dpi= option when you open the destination. For vector images like emf, setting dpi does not make sense at all. It should automatically increase/decrease dpi depending on the device. You just set the size (width, height) and windows GDI should take care of the dpi, in order to maintain the given size. ODS graphics' default aspect ratio is width:height=4:3, unless you override it.

Below, I show two examples. Hope this helps a bit.

Cheers, Chang

<sasl:code sysvlong="9.02.01M0P020508" sysscpl="W32_VSPRO"> %let pwd = %sysfunc(pathname(WORK)); %put pwd=&pwd; x cd &pwd;

/* generating a large emf file (width=8inch) */ ods listing style=journal; ods graphics on / width=8in imagefmt=emf imagename="emf"; proc sgplot data=sashelp.class; scatter x=height y=weight / group=sex; run; ods graphics off;

/* generating a 300 dpi gif file */ ods listing style=journal image_dpi=300; ods graphics on / reset=all imagefmt=gif width=4in imagename="gif"; proc sgplot data=sashelp.class; scatter x=height y=weight / group=sex; run; ods graphics off; /* generated graph file (gif.gif)^s demension: 1200 x 900 pixels */ </sasl:code>


Back to: Top of message | Previous page | Main SAS-L page