Date: Thu, 28 Jun 2007 16:34:46 +1000
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: David Johnson <d@DKVJ.BIZ>
Subject: Re: How best to share graph output
Content-Type: text/plain; charset="us-ascii"
You've had some good suggestions Andrea, I especially like the RTF
destination from Toby.
However, since it was first released, SAS/Graph has been able to produce
images in all manner of appearance. The key is using the output device
drivers, which usually specify a printer.
The GOptions statement allows you to specify an output device with the
"Device = " assertion. To find the available devices, open the catalog
SASHELP.DEVICES, and look at the entries for the printers. Among them you
will find multiple drivers for image files including GIF, BMP and PNG.
Given you are creating graphs, and I assume these are vector graphics, I
strongly counsel you against using the BMP drivers because they produce
bloatware files that rival even Microsofts idea of rendering documents in
HTML. Instead, use a vector graphics driver such as GIF or PNG. Since the
Compuserve fiasco last century, I avoid GIF on principal, and use PNG.
The following code will describe the PNG device driver and allow you to
verify the file produced meets your needs.
Proc GDevice NoFs;
The NoFs option stops the catalog from being opened for browsing in Full
Screen mode, and selects only the object specified on the second line.
If you look up the GDevice procedure you will see that you can copy existing
drivers from the SASHELP catalog to another catalog. The usual technique is
to create a library called GDEVICE0 and copy the required entry with
modifications to that catalog. Using GDEVICE0 means you don't need to
specify catalog search paths, and you only need to be careful to use a
Browse the SASHELP.DEVICES catalog and note that all have entry descriptions
that describe the printer or resolution of the driver, and make sure you
apply descriptions to your entries as well. Why create your own entries?
Because when you list the PNG driver you will see it is a resolution of 615
* 345 pixels and you may want a higher resolution file for your output.
I have used this many many times and often create new size drivers for web
output. It is seamless and the results have always satisfied me.
One last thought; when you generated your graphs the first time, the
WORK.GSEG catalog usually held those results. I would redirect the output
in your procedure call to a SASUSER catalog and manage that for your output.
I also always use the NAME = and DESC = options on SAS/Graph procedures to
ensure I have a record of the purpose of the graph.
Once the graph is held in an image catalog, you can put it out again, as a
file if required, using the GReplay procedure. I have also had a lot of
success in using the Template options of the GReplay procedure to lay out
multiple graphs in a single image. That may be very useful where you have
groups of related graphs.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of
Sent: Thursday, 28 June 2007 12:17 PM
Subject: How best to share graph output
I have a program that produces about 5 graphs for maybe three or four
attributes. So I need to get about 15-20 graphs to a specific person.
I would like to use SAS to e-mail them as attachments, but I can't
figure out how to get PC SAS 9.1.3 to save them out to a file that I
could attach. I'd rather have them all in one file, but separate would
be fine (might be better in case I have one case where I have too many
and would go over the attachment size limits)
So I know how to do proc printto to create text files, and how to attach
them, but I'm kind of stumped here.
I tried ODS to make HTML, but the graphs are not part of it, they are
GIFs that have to be sent along. PDF seems to really distort the graph,
but maybe that's my best option. (PS I'm still kind of new to ODS, so
if there is a book that spells it all out, just point me to it and I'll
I can use the Export image to save them as .bmps which actually look
pretty good. But I don't know if I can get SAS to write them out as
It's late and I'm rambling, but hopefully people will have ideas or
questions I can answer in the morning to get me headed in the right
The information contained in this e-mail is confidential and/or proprietary
to Capital One and/or its affiliates. The information transmitted herewith
is intended only for use by the individual or entity to which it is
addressed. If the reader of this message is not the intended recipient,
you are hereby notified that any review, retransmission, dissemination,
distribution, copying or other use of, or taking of any action in reliance
upon this information is strictly prohibited. If you have received this
communication in error, please contact the sender and delete the material
from your computer.