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: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 439 views
  • 1 like
  • 2 in conversation