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;
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:
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;
@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;
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:
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;
@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;
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
Dear Reeza,
I also try SVG but the figures are separated in different parts (see the attached picture, please).
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.