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;
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:
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/
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:
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.