BookmarkSubscribeRSS Feed
Palhao
Calcite | Level 5

Hello there, 

 

I am having trouble on trying to save graphics on .eps format for further edition. I am using proc sagplot.

 

proc sort; by col;
proc sgplot data=WORK.IMPORT;
density ct / type=kernel group=trat; by col;
run;
 
Is there anybody that could help me?
Thanks
Miller Palhão
12 REPLIES 12
Reeza
Super User

http://documentation.sas.com/?docsetId=grstatgraph&docsetTarget=p0kroq43yu0lspn16hk1u4c65lti.htm&doc...

 

ods graphics / outputfmt=eps;

 Try that before you code and see what graph types you get.

Palhao
Calcite | Level 5

Is there a file where with the graphics?

Otherwise the graphics from the results page I just can save them in .png or .bmp.

 

 

Reeza
Super User

The log usually has the path to the image file.

 


@Palhao wrote:

Is there a file where with the graphics?

Otherwise the graphics from the results page I just can save them in .png or .bmp.

 

 


 

Palhao
Calcite | Level 5

I only find this on log WARNING: html5 destination does not support EPS images. Using the default static format.

Reeza
Super User

Yes, certain destinations support different format types and EPS is an older type that's not supported within HTML5. The documentation, original answer, includes those details. Perhaps a more detailed explanation of what you're trying to do and what you actually need would help us to solve your issue.

 


@Palhao wrote:

I only find this on log WARNING: html5 destination does not support EPS images. Using the default static format.


 

Palhao
Calcite | Level 5

Yes, I am sorry.

I am trying to save graphic for further work on adobe illustrator. I normally use this to combine graphics in one figure or to change things inside the graphic, like the color of the line or dash line, etc.

I am using sas university edition, I don't know if it is matter.

 

Thanks for your help.

 

Miller Palhão

Palhao
Calcite | Level 5

So the graphic must be in an open format where we can change line and write on it. I use to work with .eps which comes from sigma plot program, but there might be other formats also.

Reeza
Super User

I believe SVG and PNG are considered the optimal outputs in this case then.

 


@Palhao wrote:

So the graphic must be in an open format where we can change line and write on it. I use to work with .eps which comes from sigma plot program, but there might be other formats also.


 

 

Palhao
Calcite | Level 5

Dear Reeza, It seems like .svg works. But it creates a html file and needs to be converted to .pdf to open in adobe illustrator.

However, it loses some configuration. But it can be fine.

 

Thanks a lot.

 

Miller Palhão

Reeza
Super User

Why not output directly to PDF if you want that?

This is what my log looks like and there's the path to the PNG and PDF file.

 

13889
13890 proc sgplot data=sashelp.class;
13891 scatter x=weight y=height / group=sex;
13892 run;

NOTE: PROCEDURE SGPLOT used (Total process time):
real time 1.34 seconds
cpu time 0.32 seconds

NOTE: Listing image output written to
C:\Users\REEZA\SGPlot3.png.
NOTE: There were 19 observations read from the data set SASHELP.CLASS.

13893
13894 ods pdf close;
NOTE: ODS PDF printed 1 page to C:\_localdata\temp\graphs.pdf.

 

Code:

 

ods graphics / outputfmt=png;

ods pdf file='C:\_localdata\temp\graphs.pdf';

proc sgplot data=sashelp.class;
scatter x=weight y=height / group=sex;
run;

ods pdf close;
Palhao
Calcite | Level 5

Dear Reeza,

 

Now I have this message on log

"ERROR: Insufficient authorization to access /opt/sasinside/SASConfig/Lev1/SASApp/C:\_localdata\temp\graphs.pdf."

 

It might be because I do not have sas license and I am using sas university edition on demo version?

 

Thanks for your help.

Miller Palhão

Reeza
Super User

Change the path to be something relevant for your, maybe:

 

/folders/myfolders/temp 

 

If you created a temp folder for yourself. 

sas-innovate-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

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
  • 8028 views
  • 0 likes
  • 2 in conversation