BookmarkSubscribeRSS Feed
psh23
Fluorite | Level 6

I need to output EPS vector files for publication, when I run this code I get the error:

WARNING: SASREPORT13 destination does not support EPS images. Using the default static format.

 

ods graphics / reset outputfmt=eps noborder;

ods listing device=eps
dpi=300
file= 'AJE-00824-2018 Sheridan Figure 1a.eps'
gpath="G:\CA Birth Cohort AP\Final Data\";

 

proc sgplot data=week noborder;
/*code****/
run;

ods listing close;
ods graphics / reset;

12 REPLIES 12
DanH_sas
SAS Super FREQ

Are you running this inside of SAS Enterprise Guide?

psh23
Fluorite | Level 6

Yes, tried in base sas as well and got the following error:

WARNING: HTML4 destination does not support EPS images. Using the default static format.
NOTE: The graph will be rendered as an image due to the use of transparency.
ERROR: Unsupported image file format for output file.

DanH_sas
SAS Super FREQ

You need to close all ODS destinations and just open up ODS LISTING. From your BASE SAS install, try this:

 

ods _all_ close;

ods graphics / reset outputfmt=eps noborder imagename='AJE-00824-2018 Sheridan Figure 1a';

ods listing
       image_dpi=300
       gpath="G:\CA Birth Cohort AP\Final Data\";

 

Hope this helps!

Dan

psh23
Fluorite | Level 6

Hi Dan, 

 

Thanks for your help. I am still getting the error:

 

ERROR: Unsupported image file format for output file

 

 

psh23
Fluorite | Level 6
This documentation shows EPS output is only supported by PS output destination

https://documentation.sas.com/?cdcId=pgmmvacdc&cdcVersion=9.4&docsetId=odsproc&docsetTarget=p0kroq43...
A_Kh
Lapis Lazuli | Level 10

Hi, 
Has this problem ever been solved?  I have a similar scenario where I need a help on creating an EPS file.  Maybe @DanH_sas could suggest a final solution? 


ods _all_ close; 
ods graphics on; 
ods listing  /*image_dpi=600*/ gpath= "&mypath\EPS images";
	ods graphics / imagename="imagename" outputfmt=eps reset=index noborder;
	ods select survivalplot(persist);
	proc lifetest data=have method = km plots=survival(nocensor cb=hw  atrisk(outside(0.10)));
		time month*cnsr(1);
	 	strata actarm / order = internal ;
	run;
ods graphics off; 

log

NOTE: The LOGLOG transform is used to compute the confidence limits for
      the quartiles of the survivor distribution and the confidence limit
      for the survivor function. To suppress using this transform, specify
      CONFTYPE=LINEAR in the PROC LIFETEST statement.
NOTE: The graph in the LISTING destination will be rendered as an image
      due to the use of transparency.
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: PROCEDURE LIFETEST used (Total process time):
      real time           0.26 seconds
      cpu time            0.06 seconds

 

DanH_sas
SAS Super FREQ

@A_Kh , do you get the correct output if you specify OUTPUTFMT=EPSI instead of EPS? 

A_Kh
Lapis Lazuli | Level 10

Yes, I do. But my sponsor has requested specifically EPS files. And I'm not sure if EPSI has the same functionalities as EPS files.

DanH_sas
SAS Super FREQ

An ESPI file is an EPS file with a "preview bitmap". @A_Kh , try OUTPUTFMT=psepsf and see if this is the format you need. 

A_Kh
Lapis Lazuli | Level 10

@DanH_sas , thank you for your time and support!
This option created "PostScript file" with the following WARNING in the log 

WARNING 1-322: Assuming the symbol PS was misspelled as psepsf.

I assume this is not an EPS file. 
Capture.PNG

DanH_sas
SAS Super FREQ

Hmm...the psepsf output format might be supported only with the ODS LATEX destination. It might be possible to use that destination instead of ODS LISTING. You can just throw away the ".tex" file and keep the ".eps" file generated for the graph. @A_Kh , please try something like the following and see if is works for you.

 

ods _all_ close; 
ods graphics on; 
ods latex  path= "&mypath\EPS images" file="ignore.tex";
	ods graphics / imagename="imagename" outputfmt=psepsf reset=index noborder;
	ods select survivalplot(persist);
	proc lifetest data=have method = km plots=survival(nocensor cb=hw  atrisk(outside(0.10)));
		time month*cnsr(1);
	 	strata actarm / order = internal ;
	run;
ods graphics off; 
ods _all_ close;
A_Kh
Lapis Lazuli | Level 10

Interesting.. This time the code produced PNG file (with higher resolution than it is produced usually with IMAGEFMT=PNG option). The same WARNING message in the log (WARNING 1-322: Assuming the symbol PS was misspelled as psepsf.)

Capture.PNG

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 12 replies
  • 7557 views
  • 1 like
  • 3 in conversation