- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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"; run;
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";
run;
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)
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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";
run;
ods pdf close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.