I'm using PROC SGPLOT and trying to determine if it is possible to split AND rotate the xaxis values. I see you can do one or the other utilizing FITPOLICY/SPLITCHAR/VALUESROTATE , but I'd like to do both. It was possible to do in PROC GCHART
axis2 minor=none offset=(0.3 in, 0.3 in) value=(font="Myriad Web Pro" h=10pt a=90 t=1 "Followed Up" t=2 "Post-Discharge" j=c "ROP Treatment"):
Is there a way to recreate this in PROC SGPLOT?
data have;
set sashelp.heart(obs=100);
length _sex $ 80;
if sex='Male' then _sex='Followed Up';
else _sex='Post-Discharge'||'0A'x||'ROPTreatment';
run;
proc sgplot data=have;
vbox weight/category=_sex;
xaxis fitpolicy=rotatealways valuesrotate=vertical ;
run;
Yes, it is discrete.
data have;
set sashelp.heart(obs=100);
length _sex $ 80;
if sex='Male' then _sex='Followed Up';
else _sex='Post-Discharge'||'0A'x||'ROPTreatment';
run;
proc sgplot data=have;
vbox weight/category=_sex;
xaxis fitpolicy=rotatealways valuesrotate=vertical ;
run;
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.