Although you're asking for proc template code ... I thought it might be worth showing you some Proc Gchart code where I annotate error bars on the bar chart (hopefully the spacing in the data lines won't get messed up too much in the copy-n-paste). This is an adapted version of Example 10 in my new book "SAS/GRAPH: Beyond the Basics"... data repdata; input Name $ 1-20 lower_whisker lower_box Median upper_box upper_whisker; datalines; Allison, R 0.5 6.1 8.2 11.0 17.5 Jeffreys, E 1.0 5.8 9.5 13.0 20.2 Peterson, B 3.0 8.8 11.0 13.1 17.2 Proctor, L 2.0 6.1 9.0 11.5 16.0 Taylor, C 1.5 5.5 9.0 12.6 18.7 Davis, J 2.5 6.0 9.3 11.8 14.8 ; run; %let boxwidth=1.5; %let linewidth=.5; %let linecolor=black; %let boxcolor=cxCAE1FF; data repanno; set repdata; xsys='2'; ysys='2'; hsys='3'; when='a'; length function color $8 style $15; size=&linewidth; /* draw the whiskers */ color="&linecolor"; ysys='2'; midpoint=Name; function='move'; x=lower_whisker; output; function='draw'; x=upper_whisker; output; /* draw the ends on the whiskers */ color="&linecolor"; ysys='2'; midpoint=Name; function='move'; x=lower_whisker; output; function='move'; ysys='7'; y=-1*&boxwidth; output; function='draw'; line=1; y=+2*&boxwidth; output; ysys='2'; midpoint=Name; function='move'; x=upper_whisker; output; function='move'; ysys='7'; y=-1*&boxwidth; output; function='draw'; line=1; y=+2*&boxwidth; output; /* draw the box, using annotate 'bar' function */ color="&boxcolor"; ysys='2'; midpoint=Name; function='move'; x=lower_box; output; function='move'; ysys='7'; y=-1*&boxwidth; output; function='bar'; line=0; style='solid'; x=upper_box; y=+2*&boxwidth; output; color="&linecolor"; ysys='2'; midpoint=Name; function='move'; x=lower_box; output; function='move'; ysys='7'; y=-1*&boxwidth; output; function='bar'; line=0; style='empty'; x=upper_box; y=+2*&boxwidth; output; /* Median Line */ color="&linecolor"; ysys='2'; midpoint=Name; function='move'; x=Median; output; function='move'; ysys='7'; y=-1*&boxwidth; output; function='draw'; line=1; y=+2*&boxwidth; output; run; goptions gunit=pct htitle=5 ftitle="albany amt/bold" htext=3.0 ftext="albany amt" ctext=gray33; axis1 order=(0 to 25 by 5) minor=none label=none offset=(0,0); pattern1 v=solid c=red; title1 ls=1.5 "Annotated Boxplot on Gchart"; proc gchart data=repdata anno=repanno; hbar name / type=sum sumvar=median raxis=axis1 autoref cref=graydd clipref; run;
... View more