|
代码:
*变换镜面数据;
data butterfly;
set yc.sh319;
format col1 5.2;
informat col1 5.2;
col1=-col1;
zero=0;
run;
*格式设定;
proc format;
picture positive low-<0='000.0' 0<-high='000.0';
run;
*横向镜面;
proc sgplot data=butterfly;
format col1 col2 positive.;
hbarparm category=label response=col1 /DATALABEL=col1 legendlabel="城市" barwidth=0.5 ;
hbarparm category=label response=col2 /DATALABEL=col2 legendlabel="农村" barwidth=0.5 ;
xaxis values=(-35 to 35 by 5) label="%" ;
yaxis display=(noline nolabel);
keylegend /position=BOTTOMRIGHT across=1 location=inside ;
run;
|