pro refline,x,y,value,linetype ;The procedure refline.pro puts a reference line on a plot. ;Use is as follows: ; refline,x,y,value,linetype ;Where ; x = 1 to put a vertical line(s), =0 otherwise ; y = 1 to put a horizontal line(s), =0 otherwise ; value = a number or array of numbers that gives the ; axis values for the lines desired ; linetype = a number denoting the linestyle ; (0-solid, 1-dotted, 2-dashed, 3-dash dot ; 4-dash dot dot dot, 5-long dashes) ;BWBerger Summer 1998. ;Modified by BWB 1/12/99 to hopefully fix a problem where the lines ;would not be drawn for some axes ranges. -The fix was hopefully the ;use of a 100 points, evenly spaced at each value, instead of just endpoints. val=fltarr(len(value),100) for i=0,len(value)-1 do begin val(i,*)=float(value(i)) endfor val2=(findgen(100)-50)*10000. for i=0,len(value)-1 do begin if x eq 1 then begin oplot,val(i,*),val2,$ linestyle=linetype endif if y eq 1 then begin oplot,val2,val(i,*),$ linestyle=linetype endif endfor return end