@DanH_sas and all those replied, Thanks, as I got some kind of clue from each of your responses. @DanH_sas Thanks , I tried ERRORCAPSCALE (as shown in the https://blogs.sas.com/content/graphicallyspeaking/files/2017/11/Cap_Scale.txt) ,but that is not working for me . I use SAS 9.4 version. Is it because of that? I found a way to keep the median dashed line. See below my output and code: data aaa; set stat; IQR=(p75-p25) *1.5; IQR_plus=p75+IQR; iqr_neg=p25-iqr; mchar='-'; mbigchar='------------------------------------'; /** to keep the median dashed line***/ cnsrtxt=put(cnsr,mace.); run; proc sgplot data=aaa nocycleattrs; highlow x=cnsr high=p75 low=p25 / group=cnsrtxt type=bar groupdisplay=cluster grouporder=ascending clusterwidth=0.7 barwidth=0.7 name='a'; scatter x=cnsr y=mean / group=cnsrtxt groupdisplay=cluster grouporder=ascending clusterwidth=0.7 markerattrs=(size=9 symbol=circlefilled ); scatter x=cnsr y=p75 / yerrorupper=iqr_plus yerrorlower=p75 group=cnsrtxt groupdisplay=cluster grouporder=ascending clusterwidth=0.7 markerchar=mchar markercharattrs=(size=1); ; scatter x=cnsr y=p25 / yerrorupper=p25 yerrorlower=iqr_neg group=cnsrtxt groupdisplay=cluster grouporder=ascending clusterwidth=0.7 markerchar=mchar markercharattrs=(size=1); scatter x=cnsr y=median / yerrorupper=median yerrorlower=median noerrorcaps group=cnsrtxt groupdisplay=cluster grouporder=ascending clusterwidth=0.7 markerchar=mbigchar markercharattrs=(size=9); keylegend 'a' / location=outside position=bottom across=1 title=""; xaxis display=none; yaxis label =" xxxxxxxxxxxxxxxxx"; run;
... View more