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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.