The following program generates a .JPG image of the graph with new bar fill colors defined in xxgraph style template?
What should be added in order to also see the changes in the RESULTS tab of SAS Studio ?
proc template;
define style styles.xxgraph;
parent = styles.htmlblue;
class GraphColors / 'gdata1' = CX00B0F0 'gdata2' = CXFF33CC;
end;
run;
ods listing gpath= "&xxproject./graph008/graphs" style=xxgraph;
ods graphics / imagename='test' imagefmt=JPG;
proc sgplot data=sashelp.class;
vbarbasic name / response=height group=sex;
run;
ods graphics / reset=all;
Try changing the style of the ODS destination that SAS/Studio is using.
You can check what destinations are active by looking at SASHELP.VDEST. When I check it looks like SAS/Studio is using HTML5(WEB) as the destination name.
proc template;
define style styles.xxgraph;
parent = styles.htmlblue;
class GraphColors / 'gdata1' = CX00B0F0 'gdata2' = CXFF33CC;
end;
run;
ods HTML5(WEB) style=xxgraph;
proc sgplot data=sashelp.class ;
title1 'XXGRAPH style';
vbarbasic name / response=height group=sex;
run;
Result
Try changing the style of the ODS destination that SAS/Studio is using.
You can check what destinations are active by looking at SASHELP.VDEST. When I check it looks like SAS/Studio is using HTML5(WEB) as the destination name.
proc template;
define style styles.xxgraph;
parent = styles.htmlblue;
class GraphColors / 'gdata1' = CX00B0F0 'gdata2' = CXFF33CC;
end;
run;
ods HTML5(WEB) style=xxgraph;
proc sgplot data=sashelp.class ;
title1 'XXGRAPH style';
vbarbasic name / response=height group=sex;
run;
Result
Thank you for the name of the destination. That's what I could not find.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.