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
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.
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.