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

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;

 

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

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!

View solution in original post

1 REPLY 1
DanH_sas
SAS Super FREQ

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!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 277 views
  • 0 likes
  • 2 in conversation