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

Hi for the attached graph, my axis labels are cut off for the middle and third rows. how do I prevent this? thank you.

 

here is the code I'm using: 

proc sgscatter data=mydata;
title "Spatial Gait Symmetry Parameters vs. SF-36 Functional Scores";
compare x=(PF VT GH)
		y=(speed_SymIdx_iqr cadenceSymIdx_iqr peakswing_SymIdx_iqr maxTC2_SymIdx_iqr)
		/loess=(nogroup) group=group
		markerattrs=(symbol=CircleFilled size=14)
   filledoutlinedmarkers 
   colormodel=(CX3288BD CX99D594 CXE6F598 CXFEE08B CXFC8D59 CXD53E4F);
   LABEL PF='Physical Function' VT='Vitality' GH='General Health'
    speed_SymIdx_iqr='Strike Speed(IQR)'
    peakswing_SymIdx_iqr='Peak Angular Velocity_IQR'
    maxTC2_SymIdx_iqr='2nd Max-Toe Clearance_IQR';
   format group group.;
   run; quit;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

If you have SAS 9.4+ you can try the SPLITCHAR or FITPOLICY option. I'm not sure what version it's available in, it may be later versions. 

 

PS. If you post code that references a SASHELP data set we can run the code and test the options. 

 

Documentation with some examples here:

http://documentation.sas.com/?docsetId=grstatproc&docsetTarget=p1kiem0vt5yk8sn14amo4z5l76d2.htm&docs...

View solution in original post

3 REPLIES 3
SuryaKiran
Meteorite | Level 14

Unfortunately there is no option in SAS for controlling the Axis label. But you can custom code them using the Annotation which is little tricky. 

 

Check these: https://support.sas.com/resources/papers/proceedings11/277-2011.pdf

https://stats.idre.ucla.edu/sas/code/generating-multiline-axis-labels-in-sas-proc-sgplot/

 

Thanks,
Suryakiran
Reeza
Super User

If you have SAS 9.4+ you can try the SPLITCHAR or FITPOLICY option. I'm not sure what version it's available in, it may be later versions. 

 

PS. If you post code that references a SASHELP data set we can run the code and test the options. 

 

Documentation with some examples here:

http://documentation.sas.com/?docsetId=grstatproc&docsetTarget=p1kiem0vt5yk8sn14amo4z5l76d2.htm&docs...

Reeza
Super User
I've moved this to the Graphics forum, so the SAS Graph staff can assist if required.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 4150 views
  • 3 likes
  • 3 in conversation