You need to use TWO rows or more to split this long text .
Here is an example(proc sgplot) I used before to split a long text into THREE rows.
data forest_subgroup;
infile cards truncover expandtabs;
label Subgroup='子组'
Count='人数' Percent='Mean(SD)'
Count_test='人数' Percent_test='Mean(SD)'
ci='组间差(95%CI)'
pvalue='P值';
input Id Subgroup : $80. Count Percent : $40. Count_test Percent_test : $40. Mean Low High ci :$40. pvalue $;
indentWt=1;
ObsId=_n_;
datalines;
1 总体 332 6.35(3.45) 111 3.73(3.98) 2.62 1.85 3.39 2.62(1.85,3.39) <0.001
1 年龄 . . . . . . . .
2 1~3岁 101 5.80(3.43) 36 3.75(4.38) 2.05 0.63 3.47 2.05(0.63,3.47) 0.005
2 4~7岁 120 6.30(3.69) 37 2.73(3.65) 3.58 2.21 4.95 3.58(2.21,4.95) <0.001
2 8~14岁 111 6.91(3.12) 38 4.69(3.75) 2.22 0.99 3.44 2.22(0.99,3.44) <0.001
1 基线VAS评分 . . . . . . . .
2 ≤6分 78 3.44(2.73) 37 1.31(2.79) 2.13 1.04 3.21 2.13(1.04,3.21) <0.001
2 >6分 254 7.25(3.14) 74 4.94(3.95) 2.31 1.32 3.30 2.31(1.32,3.30) <0.001
1 中位病程 . . . . . . . .
2 中位病程以下 162 6.32(3.79) 63 3.65(4.43) 2.67 1.50 3.83 2.67(1.50,3.83) <0.001
2 中位病程以上 170 6.38(3.09) 48 3.83(3.35) 2.55 1.54 3.56 2.55(1.54,3.56) <0.001
1 剔除使用 . . . . . . . .
1 “未指定的草药和传统药物” 298 6.41(3.22) 107 3.78(4.04) 2.64 1.78 3.49 2.64(1.78,3.49) <0.001
1 的受试者 . . . . . . . .
1 增加01中心 364 6.23(3.36) 120 3.67(3.91) 2.56 1.78 3.35 2.56(1.78,3.35) <0.001
1 年龄(增加01中心) . . . . . . . .
2 1~3岁 104 5.77(3.39) 37 3.65(4.37) 2.12 0.53 3.71 2.12(0.53,3.71) 0.010
2 4~7岁 135 6.23(3.56) 41 2.91(3.52) 3.32 2.07 4.57 3.32(2.07,4.57) <0.001
2 8~14岁 125 6.62(3.08) 42 4.44(3.79) 2.19 1.03 3.34 2.19(1.03,3.34) <0.001
;
run;
data forest_subgroup;
set forest_subgroup;
indentWt=1;
ObsId=_n_;
run;
data forest_subgroup_2;
set forest_subgroup nobs=n end=last;
length text $20;
val=mod(_N_-1, 6);
/* if val eq 1 or val eq 2 or val eq 3 then ref=obsid;*/
if obsid in (2:5 9:11 15 ) then ref=obsid;
/*--Separate Subgroup headers and obs into separate columns--*/
indentwt=2;
if id=1 then indentWt=0;
output;
if last then do;
call missing (subgroup, count, percent, Count_test ,Percent_test, mean, low, high, ci,
indentwt, val, ref ,pvalue);
obsid=n+1;
xl=1; yl=n+1; text='P'; output;;
xl=4; yl=n+1; text='T'; output;
end;
run;
/*--Define Format with Unicode for the left and right arrows--*/
proc format;;
value $txt
"T" = "试验组更好 (*ESC*){Unicode '2192'x}"
"P" = "(*ESC*){Unicode '2190'x} 对照组更好";
run;
/*--Attribute maps for Subgroup Test attributes--*/
data attrmap;
length textweight $10;
id='text'; value='1'; textcolor='Black'; textsize=15; textweight='bold'; output;
id='text'; value='2'; textcolor='Black'; textsize=10; textweight='normal'; output;
run;
/*--Forest Plot--*/
options missing=' ' orientation=landscape ;
/*ods listing style=htmlblue;*/
title j=l h=1.2 " 试验组 对照组";
/*ods listing gpath='c:\temp\' image_dpi=400;*/
/*ods graphics / reset width=5in height=3in imagename='Subgroup_Forest_SG_94';*/
ods rtf file='c:\temp\temp.rtf' style=htmlblue;
ods graphics / reset width=9.6in height=4.5in noborder noscale outputfmt=png;
proc sgplot data=forest_subgroup_2 nowall noborder nocycleattrs dattrmap=attrmap noautolegend;
format text $txt.;
styleattrs axisextent=data;
refline ref / lineattrs=(thickness=20 color=grayee); /*<-- discrete thickness*/
highlow y=obsid low=low high=high /lowcap=serif highcap=serif lineattrs=(color=black); /*clipcap CLIPCAPSHAPE=CLOSEDARROW */
scatter y=obsid x=mean / markerattrs=(symbol=squarefilled size=8 color=black );
scatter y=obsid x=mean / markerattrs=(size=0) x2axis;
refline 0 / axis=x;
text x=xl y=obsid text=text / position=bottom contributeoffsets=none strip textattrs=(size=10);
yaxistable subgroup / location=inside position=left textgroup=id labelattrs=(size=10)
LABELJUSTIFY=left valueattrs=(size=10 )
textgroupid=text indentweight=indentWt;
yaxistable Count Percent Count_test Percent_test ci pvalue/ VALUEJUSTIFY=right
location=inside position=left labelattrs=(size=10) valueattrs=(size=10) pad=(right=15px) ;
yaxis reverse display=none colorbands=odd colorbandsattrs=(transparency=1) ;
xaxis display=(nolabel) values=(0 to 5 by 1);
x2axis label='组间差' display=(noline noticks novalues) labelattrs=(size=10) ;
run;
ods rtf close;
... View more