BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
xxformat_com
Barite | Level 11

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;
1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

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

Tom_0-1719679436668.png

 

 

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

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

Tom_0-1719679436668.png

 

 

xxformat_com
Barite | Level 11

Thank you for the name of the destination. That's what I could not find.

SAS Innovate 2025: Register Today!

 

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.


Register now!

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
  • 526 views
  • 1 like
  • 2 in conversation