I'm not understanding what the difference between the titlehalign= option and the titlejustify= option in the axistables when reading the online doc (https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n0ka2y1m7pmaqdn1ijnwzp8jljoc.htm).
Would you have an example which shows the difference?
Here is an example with both options.
data class;
sex='M'; freq=5; age=12; output;
sex='M'; freq=6; age=13; output;
sex='M'; freq=7; age=14; output;
sex='F'; freq=7; age=12; output;
sex='F'; freq=8; age=13; output;
sex='F'; freq=9; age=14; output;
run;
proc sgplot data=class;
hbarbasic sex / response=freq;
yaxistable freq / class=age
location=inside separator
title='Test'
titlejustify=center
pad=50;
yaxistable freq / class=age
location=inside separator
title='Test'
titlehalign=center
pad=50;
run;
The TITLEALIGN option specifies the position of the text bounding box with the width of the axis table. The TITLEJUSTIFY option justifies the text within the bounding box. This option is used mainly when you have a long title that wraps. To see this clearly, change the TITLE in your first YAXISTABLE to be "test a very long title". With the TITLEJUSTIFY=CENTER option, you'll see the text center-justified in the bounding box. Hope this helps!
The TITLEALIGN option specifies the position of the text bounding box with the width of the axis table. The TITLEJUSTIFY option justifies the text within the bounding box. This option is used mainly when you have a long title that wraps. To see this clearly, change the TITLE in your first YAXISTABLE to be "test a very long title". With the TITLEJUSTIFY=CENTER option, you'll see the text center-justified in the bounding box. Hope this helps!
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!
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.