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

Hi,

 

I would like to know whether a function similar to splithcar for axis values would exist to split the axis label.

 

In the example, it would mean to have on the first line Example: and on the second lien  to split.

 

 

proc sgplot data=sashelp.class noborder;
    vbar sex / missing;
                  
    xaxis label      = 'Example: to split'
          labelpos =right;
run;

 

 

1 ACCEPTED SOLUTION
5 REPLIES 5
Reeza
Super User

This will depend on your version, but if you have the latest, use the SPLITPOLICY options.

 

https://documentation.sas.com/?docsetId=grstatproc&docsetTarget=p1kiem0vt5yk8sn14amo4z5l76d2.htm&doc...

 

If you have an older version, try this approach:

https://communities.sas.com/t5/Graphics-Programming/Split-format-label-for-xaxis-values-with-PROC-SG...

 


@xxformat_com wrote:

Hi,

 

I would like to know whether a function similar to splithcar for axis values would exist to split the axis label.

 

In the example, it would mean to have on the first line Example: and on the second lien  to split.

 

 

proc sgplot data=sashelp.class noborder;
    vbar sex / missing;
                  
    xaxis label      = 'Example: to split'
          labelpos =right;
run;

 

 


 

xxformat_com
Barite | Level 11
Please read the question. I'm not looking for splitting the values on the axis but the label of the axis.
Reeza
Super User
What's the output format?
xxformat_com
Barite | Level 11
The "(*ESC*){unicode '000a'x}" suggested in the link does the work. Thanks.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 4825 views
  • 3 likes
  • 2 in conversation