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!
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
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.
Ready to level-up your skills? Choose your own adventure.