Hi, Since ODS graphics boxplot does not support clipping, I'm trying to manually calculate the clipping range and change the boxplot template to add an overlay plot for the clipping range. I'm following the formula here: http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_boxplot_sect023.htm. With the data provided in the example, the clipping ranges I computed seem to match the values on the plot. But when I used a different data set, I got very different results. Here's my code. Can someone help me understand what's causing the difference? Thanks! proc sort data=sashelp.cars out=cars(keep=make horsepower); by make; where make < 'L'; run; /* ============== manual calculation ==================*/ proc means data=cars q1 q3 nway missing noprint; class make; var horsepower; output out=cars_sum (drop=_freq_ _type_) q1=grp_q1 q3=grp_q3; run; proc means data=cars_sum mean nway missing noprint; var grp_q1 grp_q3; output out=all_sum(drop=_freq_ _type_) mean=grp_q1_mean grp_q3_mean; run; data all_sum; set all_sum; ymax = grp_q1_mean + (grp_q3_mean - grp_q1_mean) * 1.5; ymin = grp_q3_mean - (grp_q3_mean - grp_q1_mean) * 1.5; run; /* =================== get results from boxplot ============== */ ods graphics off; proc boxplot data=cars; plot horsepower * make /clipfactor=1.5; run;
... View more