BookmarkSubscribeRSS Feed
n6
Quartz | Level 8 n6
Quartz | Level 8

First of all, I'm using SAS Version 9.4.  Next, I've created a bunch of graphs for someone and they want me to send them electronically.  Usually when I send a SAS graph to someone I create the graph then do File -> Export as Image, then save it on my C drive, then e-mail it to the person from there.  It's kinda bulky but it works.

But I just ran maybe 25 graphs for someone and they're all in the SAS graph window and the person says  "Okay, send those to me" and I'm imagining myself doing the above procedure 25 times and I'm thinking that there has to be a better way.  Can't I just save everything in the SAS Graph window to one big file and then send the person that file and let them flip through it at will?

3 REPLIES 3
ballardw
Super User

Your environment can have an effect on these. Are you running EG or Base SAS? On a server?

And does the user need to edit the graphs or just look at them?

For basic display I tend to put all of the graphs into and RTF document and send that.

Code looks something like:

ods rtf file="<your operating system path syntax goes here> filename.rtf"

     style=default; <or which ever ODS style you prefer, the RTF without a specified style uses the RTF style which I find somewhat ugly>

<code to generate all of your graphs>

ods rtf close;

And all of the graphs will be in the output RTF document unless there is an error.

BTW if your are using the default HTML output I suspect if you look in your WORK folder with a system program such as Windows Explorer you will likely find a bunch of PNG files that have the output.

n6
Quartz | Level 8 n6
Quartz | Level 8

I'm running base SAS on a PC.  I didn't realize you could use ODS with SAS Graph.  I just did it with RTF and it worked fine.  The graphs were a bit squished, but that's okay and it's easy to skim through them via clicking arrows.  If we decide we want a couple of the graphs for a paper or whatever I'll reproduce them the old fashioned way that looks nicer.  I also tried making them HTMLs (with the HTML suffix in ODS instead of the RTF suffix) and I got a blank square in the output where the graph should be, so there was obviously an issue with that, but the RTF worked and therefore the HTML not working doesn't really matter.

Thanks for your input.

ballardw
Super User

"squished" is likely a result of the current goptions for hsize and vsize or xpixels and ypixels settings. These settings control the aspect ratio. You didn't mention the types of graphs your are producing but you may want to investigate the SG procedures as you can do many things that aren't possible with Gplot and Gchart.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1245 views
  • 0 likes
  • 2 in conversation