The SAS Output Delivery System and reporting techniques

ods png name can't change for each graph

Reply
Super Contributor
Posts: 254

ods png name can't change for each graph

ods listing  gpath="C:\temp\figures" file="street.png";
proc sgplot data=.....
.....
ods listing gpath="C:\temp\figures" file="house.png";
  proc sgplot data=.....
.....


ods listing gpath="C:\temp\figures" file="pet.png";
  proc sgplot data=.....
.....

Hello all;

 

I have three graphs draw from SAS,I want to use ods get the three png files with different names.but SAS automaticlly sign ed same prefix name for these files such as  SGplot1,SGplot2 .......

 

How to customize name for each files from the SAS ods?

 

thanks!

Super User
Posts: 20,731

Re: ods png name can't change for each graph

Posted in reply to GeorgeSAS

Check if the ODS GRAPHICS statement allows you to control the image name. 

http://documentation.sas.com/?docsetId=grstatproc&docsetTarget=p0f8elds7dc3dnn1ahm2cep3n0ce.htm&docs...

Respected Advisor
Posts: 5,050

Re: ods png name can't change for each graph

Posted in reply to GeorgeSAS

This is how I name my graphic files:

 

ods listing gpath="&path.\Graphiques" style=journal image_dpi=600;
ods graphics / imagename="Biomarker VG" noborder 
    reset=index height=600 width=600;
proc sgplot ....

This will create a graph in a square picture in a file named &path.\Graphiques\Biomarker VG.png with the journal style. The reset=index option forces SAS to start the creation of graphic files with Biomarker VG even if the name already exists in the directory. Otherwise SAS would add a number suffix to the name to make it unique.

 

PG
Ask a Question
Discussion stats
  • 2 replies
  • 139 views
  • 1 like
  • 3 in conversation