Pro oplot_err, X, Low, High, Width = width, color=color
on_error,2
if n_elements(color) ne 0 then col = color else col =!p.color
if n_params(0) eq 3 then begin
up = high
down = low
xx = x
endif else begin
up = x
down = low
xx=findgen(n_elements(up))
endelse
if !y.type eq 1 then down = 10^min(!y.crange) > down
if n_elements(width) eq 0 then width = .01
width = width/2
n = n_elements(up) < n_elements(down) < n_elements(xx)
xxmin = min(!x.crange)
xxmax = max(!x.crange)
yymax = max(!y.crange)
yymin = min(!y.crange)
if !x.type eq 0 then begin
wid = (xxmax - xxmin) * width
endif else begin
xxmax = 10.^xxmax
xxmin = 10.^xxmin
wid = (xxmax/xxmin)* width
endelse
for i=0l,n-1 do begin
xxx = xx(i)
if (xxx ge xxmin) and (xxx le xxmax) then begin
oplot,[xxx,xxx],[down(i),up(i)],color=col
endif
endfor
return
end