这里有一个示例“龙卷风图” 。我正在尝试修改该代码。这是我的修改版本:
%let name=ex_17;
goptions reset=(global goptions);
GOPTIONS DEVICE=png xpixels=800 ypixels=600;
goptions gunit=pct border cback=lightgray colors=(blacks) ctext=black
htitle=6.5 htext=3 ftitle="albany amt" ftext="albany amt";
data mileage;
input factor $ level $ value;
datalines;
Screening M 7199
Diagnosis F 4502
Biopsy M 12304
Treatment F 5428
Recovery M 15701
Metastasis F 6915
;
data convert;
set mileage;
if level='F' then value=-value;
run;
proc format;
picture posval low-high='000,009';
run;
data anlabels(drop=factor level value);
length text $ 24;
retain function 'label' when 'a' xsys ysys '2' hsys '3' size 2;
set convert;
midpoint=factor; subgroup=level;
text=left(put(value, posval.));
if level ='F' then position='>';
else position='<'; output;
run;
title1 'One-Way Sensitivity Analysis on NNS to Gain 1 QALY';
*axis1 label=(justify=left 'Disutility') style=0 color=black;
axis1 label=(justify=left '') style=0 color=black;
axis2 label=none value=(tick=3 '') minor=none major=none
width=3 order=(-10000 to 20000 by 10000) color=black;
pattern1 value=solid color=green;
pattern2 value=solid color=blue;
proc gchart data=convert;
format value posval.;
note move=(25,80) height=3 'Women' move=(+10,+0) 'Men';
hbar factor / sumvar=value discrete nostat subgroup=level
maxis=axis1 raxis=axis2 nolegend annotate=anlabels
coutline=same des='';
run;
quit;
但是,正如您通过运行此代码所看到的那样,每个条的标签都被截断,不完全可见。此外,有些条形图是不可见的。
我在做什么使这些东西不可见,我该如何解决这个问题?