Here is a short procedure which draws Boxplot. You may want to change line
width by "thick" parameter (ex. plots,[1,1],[1,2],thick=4)
example:
WAVE> plot,[1,2],/nodata,yr=[0,10],xr=[0,10]
WAVE> box_plot, 2, [1,3,4,6,8,9,5], 0.5
------------------------------------------------------------ -------------
pro box_plot, x, y, w
w2 = float(w)/2
xx = [x-w2, x+w2]
for i=0, 4 do begin
plots, xx, [y(i), y(i)]
endfor
plots, [x, x], [y(0), y(1)]
plots, [x, x], [y(3), y(4)]
plots, [x-w2, x-w2], [y(1), y(3)]
plots, [x+w2, x+w2], [y(1), y(3)]
plots, [x, x], [y(5), y(5)], psym=2
end
------------------------------------------------------------ ------------------
Hisa Noguchi
ADE Corp.
77 Rowe St. Newton, MA 02166
jg1ifj@world.std.com
|