BookmarkSubscribeRSS Feed
xxformat_com
Barite | Level 11

Hi,

 

The xaxitable can be a nice workaround to add a title which is aligned with the y-axis.

 

However, I'm not sure it is possible to use multiple styles in that title.

I've tried ^S={color=} but was not successfull.

Can you think of any other approach using xaxistable?

 

ods escapechar='^';

proc sgplot data=sashelp.class;
    vbarbasic name / response=height;
    
    xaxistable name / position=top
                      nolabel 
                      title      = "^S={color=red}Part 1 ^S={color=blue}Part 2^S={} Part 3"
                      valueattrs = (color  = white); 
run;

 

I can use the text function with sganno= or use leading blanks in the title statement but I find the xaxistable quite interesting here and I'm only looking for a xaxitable solution.

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

It looks like in this case, the TITLE style can only be set via TITLEATTRS.

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 16. 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
  • 1 reply
  • 294 views
  • 2 likes
  • 2 in conversation