ziyenano ,非常感谢!
根据你的指导,我修改了一下代码,效果图见图片。唯一的缺点就是不能每一周显示一个数字,而是一周有多个数字。
/*******************************************************************************************/
data test;
input Week EC $ Wafer $ Yield Input N;
datalines;
35 G 32CCB 0.75969 1781 1
35 I 25F2F 0.67953 4509 2
35 I 25F33 0.75215 2324 3
36 G 31C38 0.86103 1655 4
36 G 32527 0.84716 12850 5
36 G 3252C 0.83039 4251 6
36 G 32555 0.723 2769 7
36 G 3276C 0.83275 11390 8
36 G 32A8B 0.86513 3255 9
36 G 32A8F 0.8217 3466 10
36 G 32A90 0.77304 3798 11
36 G 32A91 0.78875 3413 12
36 G 32AA9 0.60618 3461 13
36 G 32AAC 0.8622 3106 14
36 G 32E5A 0.8231 831 15
36 G 32EE9 0.76768 891 16
36 G 32F3B 0.84331 919 17
36 H 32926 0.89561 820 18
36 I 2386E 0.72531 2547 19
36 I 3305C 0.63653 1593 20
36 I 33250 0.70183 1697 21
37 E 4F038 0.51043 1725 22
37 G 31A88 0.87808 812 23
37 G 31C38 0.81805 5320 24
37 G 31D2A 0.74186 1658 25
37 G 32555 0.72628 5060 26
37 G 325C6 0.86811 508 27
37 G 32B7F 0.77179 1560 28
37 G 32BCB 0.72298 1841 29
37 G 32E5A 0.91723 894 30
37 G 32EAC 0.87753 1780 31
37 G 32EB3 0.74673 1836 32
37 G 32EB6 0.84628 1763 33
37 G 32EE9 0.82094 1022 34
37 G 32F01 0.71214 1796 35
37 G 32F06 0.83528 856 36
37 G 32F18 0.76987 1673 37
37 G 32F3B 0.82124 772 38
37 H 32926 0.94324 4840 39
;
run;
proc sql noprint;
select cat(N,'=',quote(compress(put(week,2.)))) into:format separated by ' ' from test;
select count(1) into:count from nb.test;
quit;
proc format;
value axis &format;
run;
/*******************************************************************************************/
proc template;
define statgraph temp;
begingraph /designwidth=9in designheight=6in;
entrytitle 'Yield Trend By Wafer By EC';
entryfootnote halign=center 'XXXX Confidential'
halign=right "XXXX";
layout overlay / wallcolor=lightyellow
yaxisopts=(label='Yield' offsetmin=0 offsetmax=0 griddisplay=on
linearopts=(tickvalueformat=percent8.1
tickvaluesequence=(start=0 end=1 increment=0.05)
viewmin=0.5 viewmax=1))
xaxisopts=(label='Week' griddisplay=on
linearopts=(tickvalueformat=axis.
tickvaluesequence=(start=0 end=100 increment=2)));
bubbleplot x=N y=Yield size=Input / group=EC
bubbleradiusmax=20 bubbleradiusmin=5 name='Y';
layout gridded / columns=1 autoalign=(topright);
entry halign=left textattrs=(color=blue) "one point one wafer";
entry halign=left textattrs=(color=blue) "circle size represent qty";
endlayout;
endLayout;
layout globallegend / type=column;
discretelegend "Y" / title="EC:";
endLayout;
endgraph;
end;
run;
/*******************************************************************************************/
ods listing close;
ods html style=default;
ods graphics on / reset=all;
proc sgrender data=test template=temp;
run;
ods html close;
ods listing;