BookmarkSubscribeRSS Feed
Calcite | Level 5

I previously used the "ODS Graphics Designer" to create a graph, which I then exported (I exported it as an .eps file, which for some reason was empty, and then as a .jpg file). I saved my work in the Graphics Designer as a .sgd file.

However, upon submitting my research to a scientific paper they asked for the graph in higher resolution.


In the meantime, the remote server that I work on (where my data is stored) updated SAS to SAS 9.4 M8, which - apparently - do not include ODS Graphics Designer. I then figured out than I can still open the graph that I made with the following code:

proc sgdesign sgd="C:\pathname\pathname\filename.sgd";

This runs the code that made the graph, shows it in the results viewer, and from there I can right click and save it - as a low resolution .png file.


In an attempt to export the graph in eps format I tried the following:

ods graphics / outputfmt=eps;
ods eps file "C:\pathname\pathname\graph.eps";

proc sgdesign sgd="C:\pathname\pathname\filename.sgd";

ods eps close;

This produces an error in the log - the ods eps file statement is not valid, as well as a warning:
"HTML4 destination does not support EPS images. Using the default static format."


I have tried replacing eps with pdf and get the same warning. 


I found this table of "supported file types for output destinations", but I can't seem to figure out what an output destination is so while this seems to be informative, I'm not SAS/tech-savy enough to understand what it is this page is trying to tell me.


Anybody with similar issues that have found a solution? 
I'm not picky with the file format, as long as I get an image out in decent resolution (300 dpi)


Calcite | Level 5

Managed now to export it as a .pdf file - still curious to know if anyone knows of a solution for exporting as a .eps file, but for anyone else stumbling upon this thread with a similar problem, a small correction in the syntax (file= in the ods pdf file) worked for me in creating a pdf:


ods graphics / outputfmt=pdf;
ods pdf file="C:\pathname\pathname\graph.pdf";

proc sgdesign sgd="C:\pathname\pathname\filename.sgd";

ods pdf close;
Super User

@LineDamsgaard wrote:

This produces an error in the log - the ods eps file statement is not valid, as well as a warning:

This means that your ODS EPS is not valid. That is not the way to generate anything. The second message is because the active ODS destination remaining open, HTML does not use the EPS graphics files.


The link you provide indicates that the ONLY ODS destination that will use EPS is the ODS PS file type. You might try the ODS LISTING and the imagefmt of EPSI as well. Listing is often the choice when you want to create an image but not package it as part of a document.


Most of the ODS destinations will have an option like IMAGE_DPI= to control the resolution. The default may vary from destination types but I think generally defaults to something in the 96 dpi (dots per inch) range. Increase the number to get more dots per inch will increase resolution of graphics but too large of a value, based on the size of the image area, can exceed available memory. 10inch by 10inch display area at 96 DPI is 960*960 or roughly 921,000 dots. If you go to 200 dpi that same image uses 4,000,000 dots. And dot uses memory to display colors.


Did you not save the code and data to create the images in the first place? Change that code would be where I would start to change the resolution. In my experience tools like the Design studio are useful for playing what if but after getting the settings export to code so I can avoid any manual steps again.



Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.


Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 


Register now!

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
  • 2 replies
  • 2 in conversation