For reference, I'm using Studio 3.5.
I'm creating my graph using this code
ods graphics / imagefmt=png imagename='DemoPNG';
proc sgplot data=work.dummytable (where=(yvar_name > 0));
scatter x=xvar_name y=yvar_name / group=category_name markerattrs=(size=5);
xaxis grid;
yaxis grid type=log;
run;
ods graphics on / reset=all;Which provides me with this graph in the results tab
And this graph in the DemoPNG.png file
Then I send the email using the following code
filename send email to=('first.last@company.com')
subject='Graph Report'
attach=('DemoPNG.png' NAME='GraphImage' INLINED='inserter')
content_type='text/html';
data _null_;
file send;
put '<IMG src="cid:inserter" height="500" width="800">';
run;I'd like to have the DemoPNG graph look like what's displayed in results but I'm having trouble figuring out how to do so. Thanks in advance for the help!
Do you used this code to save your PGN image ?
ods listing /gpath='c:\temp' ;
Or @GraphGuy Robert.A know the solution .
Perhaps try hard-coding an ods style (such as style=htmlblue).
Unfortunately, I think SAS defaults to different ods styles in different situations, rather than having the same default everywhere.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.