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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 3 replies
  • 3066 views
  • 3 likes
  • 3 in conversation