BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
afgdurrani0
Pyrite | Level 9

Hello,

I need help to export graphs from SAS University Edition as EPS. Thanks

 data class;
      input Estimate Actual;
      datalines;
29.6 28.5
17.1 13.7
16.6 13.2
4.6 3.5
21.1 19.3
16.8 14.3
3.7 2.5
7.1 4.2
8.0 5.9
6.7 3.2
15.5 12.4

   ;
   ods graphics on;
   proc reg data=class;
      model estimate = actual;
   run;
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

EPS isn't well supported anymore but it's possible. Here's one alternative which dumps your files to an RTF document automatically. Just make sure to open the RTF file with Word, not WordPad or NotePad. 

 

   ods rtf file = '/folders/myfolders/demo.rtf' ;
   proc reg data=class;
      model estimate = actual;
   run;
   ods rtf close;

Some longer methods here:

https://communities.sas.com/t5/SAS-Communities-Library/How-to-Export-your-SAS-Graphs-and-Tables-with...

 

I couldn't find a way to generate EPS (most likely because I don't know how) - are any other formats acceptable? EPS seems to be a fairly old file format and SVG is a lot more common these days. 

 

I'll move it to the graphics forum so someone else can answer for sure though. 

 

The other approach I tried, that didn't work:

 

  ods html5 close;  
   ods listing file='/folders/myfolders/list.txt' gpath='/folders/myfolders/';
   ods graphics / outputfmt=eps ;;
      proc reg data=class;
      model estimate = actual;
   run;
   ods listing close;
   ods html5;

https://documentation.sas.com/?docsetId=odsug&docsetTarget=p0kroq43yu0lspn16hk1u4c65lti.htm&docsetVe...

 


@afgdurrani0 wrote:

Hello,

I need help to export graphs from SAS University Edition as EPS. Thanks

 data class;
      input Estimate Actual;
      datalines;
29.6 28.5
17.1 13.7
16.6 13.2
4.6 3.5
21.1 19.3
16.8 14.3
3.7 2.5
7.1 4.2
8.0 5.9
6.7 3.2
15.5 12.4

   ;
   ods graphics on;
   proc reg data=class;
      model estimate = actual;
   run;

 

 

 

 

View solution in original post

7 REPLIES 7
Reeza
Super User

EPS isn't well supported anymore but it's possible. Here's one alternative which dumps your files to an RTF document automatically. Just make sure to open the RTF file with Word, not WordPad or NotePad. 

 

   ods rtf file = '/folders/myfolders/demo.rtf' ;
   proc reg data=class;
      model estimate = actual;
   run;
   ods rtf close;

Some longer methods here:

https://communities.sas.com/t5/SAS-Communities-Library/How-to-Export-your-SAS-Graphs-and-Tables-with...

 

I couldn't find a way to generate EPS (most likely because I don't know how) - are any other formats acceptable? EPS seems to be a fairly old file format and SVG is a lot more common these days. 

 

I'll move it to the graphics forum so someone else can answer for sure though. 

 

The other approach I tried, that didn't work:

 

  ods html5 close;  
   ods listing file='/folders/myfolders/list.txt' gpath='/folders/myfolders/';
   ods graphics / outputfmt=eps ;;
      proc reg data=class;
      model estimate = actual;
   run;
   ods listing close;
   ods html5;

https://documentation.sas.com/?docsetId=odsug&docsetTarget=p0kroq43yu0lspn16hk1u4c65lti.htm&docsetVe...

 


@afgdurrani0 wrote:

Hello,

I need help to export graphs from SAS University Edition as EPS. Thanks

 data class;
      input Estimate Actual;
      datalines;
29.6 28.5
17.1 13.7
16.6 13.2
4.6 3.5
21.1 19.3
16.8 14.3
3.7 2.5
7.1 4.2
8.0 5.9
6.7 3.2
15.5 12.4

   ;
   ods graphics on;
   proc reg data=class;
      model estimate = actual;
   run;

 

 

 

 

afgdurrani0
Pyrite | Level 9

Thanks Reeza,

It generated two of the three graphs, but the one I want to get is not generating (Fitplot). Can you please check. Also it gives some errors like: 

 

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 NOTE: ODS statements in the SAS Studio environment may disable some output features.
 73         
 74          data class;
 75               input Estimate Actual;
 76               datalines;
 
 NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
 NOTE: The data set WORK.CLASS has 11 observations and 2 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.01 seconds
       
 
 89            ;
 90            ods graphics on;
 91            proc reg data=class;
 92               model estimate = actual;
 93            run;
 
 94         
 95         
 96           ods html5 close;
 97            ods listing file='/folders/myfolders/list.txt' gpath='/folders/myfolders/';
 98            ods graphics / outputfmt=eps ;;
 
 NOTE: PROCEDURE REG used (Total process time):
       real time           17.81 seconds
       cpu time            2.52 seconds
       
 
 99               proc reg data=class;
 100              model estimate = actual;
 101           run;
 
 WARNING: HTML5 destination does not support EPS images. Using the default static format.
 WARNING: RTF destination does not support EPS images. Using the default static format.
 WARNING: HTML5 destination does not support EPS images. Using the default static format.
 WARNING: RTF destination does not support EPS images. Using the default static format.
 WARNING: HTML5 destination does not support EPS images. Using the default static format.
 WARNING: RTF destination does not support EPS images. Using the default static format.
 NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of transparency.
 NOTE: The graph in the LISTING destination will be rendered as an image due to the use of transparency.
 WARNING: The host image file formats are only available when SAS is running in DMS mode.
 ERROR: Unsupported image file format for output file.
 ERROR: Unsupported image file format for output file.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: The PROCEDURE REG printed page 1.
 NOTE: PROCEDURE REG used (Total process time):
       real time           9.21 seconds
       cpu time            3.53 seconds
       
 102           ods listing close;
 103           ods html5;
 NOTE: Writing HTML5 Body file: sashtml2.htm
 ERROR: Insufficient authorization to access /opt/sasinside/SASConfig/Lev1/SASApp/sashtml2.htm.
 ERROR: No body file. HTML5 output will not be created.
 104        
 105        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 117
afgdurrani0
Pyrite | Level 9
**Fitplot is generated but not opening. I use Adobe illustrator to look them. The first two graphs are opening while Fitplot does not.
Reeza
Super User
You noticed that I said, the code didn't work. That's why you get errors.

Not sure what you mean about the fit plot not generating. If you want to open in adobe illustrator and that's why you wanted EPS I highly suggest switching to SVG which makes these problems go away.
afgdurrani0
Pyrite | Level 9

Dear Reeza,

I also try SVG but the figures are separated in different parts (see the attached picture, please).

Reeza
Super User
Each figure is outputed to it's own file. I think if you look at the PLOTS options on the PROC REG statement but I'm also confused. The purpose of getting images in SVG/EPS is to manually edit them which usually means you do want them to be separated. If you just want them in a different document, maybe ODS RTF would work as that would dump them all to a Word Document similar to how you see them in the output. I think you can make them SVG as well, but you'll need to copy/paste to edit them.
afgdurrani0
Pyrite | Level 9
Hello Reeza,
Actually, there is a problem with RTF file since their figures are not editable in adobe illustrator. Then I downloaded the PDF one which is editable, but again the fonts were not supported, so I manually wrote the numbers and title etc.,
The reason why I prefer editable figure is that we can easily increase its pixel (dpi). While the non-editable had low resolution (not up to journals standard).

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 3287 views
  • 2 likes
  • 2 in conversation