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

Inspired by the answer to my previous question, I was wondering how to save the graphics produced by ODS, e.g. the DiagnosticsPanel produced by PROC REG. Can I turn it into a png and save it to my C drive?

 

Thanks, 

Dimitri

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @drdee,

 

I think PNG is the default format and C:\Users\username the default path. But in any case you can specify the format in the ODS GRAPHICS statement and the path in the ODS destination statement (i.e. ODS LISTING, ODS HTML, etc.). See these links for more options, e.g., to specify the file name, the image resolution, height, width, etc.

 

Example:

ods graphics on / imagefmt=png;
ods listing gpath='C:\Temp'; /* or: ods html gpath='C:\Temp'; */

A subsequent PROC REG step would then (by default) create DiagnosticsPanel.png and ResidualPlot.png (possibly with a numeric suffix added to the names to make them unique) in C:\Temp.

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hello @drdee,

 

I think PNG is the default format and C:\Users\username the default path. But in any case you can specify the format in the ODS GRAPHICS statement and the path in the ODS destination statement (i.e. ODS LISTING, ODS HTML, etc.). See these links for more options, e.g., to specify the file name, the image resolution, height, width, etc.

 

Example:

ods graphics on / imagefmt=png;
ods listing gpath='C:\Temp'; /* or: ods html gpath='C:\Temp'; */

A subsequent PROC REG step would then (by default) create DiagnosticsPanel.png and ResidualPlot.png (possibly with a numeric suffix added to the names to make them unique) in C:\Temp.

drdee
Obsidian | Level 7
Many thanks!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2 replies
  • 1388 views
  • 2 likes
  • 2 in conversation