pro arrow2,x0,y0,angle,length,head=head,angle=qangle, $ thick=thick,hthick=hthick,color=color,hsize=hsize, $ solid=solid,data=data,normalized=norm,device=device, $ tv2=tv2,qstop=qstop common tv2_blk, xsiz_pix, ysiz_pix, xsiz_inch, ysiz_inch, ppinch psym_save = !p.psym !p.psym = 0 if not keyword_set(qangle) then begin ; Provided x1 and y1 coordinates x1 = angle & y1 = length endif else begin ; Provided with angle and length qlength = length * ([1,-1])(keyword_set(head)) x1 = x0 + qlength * cos(angle*!pi/180) y1 = y0 + qlength * sin(angle*!pi/180) endelse if not keyword_set(head) then begin ; x0 and y0 is the tail xx1 = x1 & yy1 = y1 & xx0 = x0 & yy0 = y0 endif else begin ; Swap ends if /head is set. xx1 = x0 & yy1 = y0 & xx0 = x1 & yy0 = y1 endelse if keyword_set(tv2) then begin ; /tv2 - always use device coordinates norm0=0 & data0=0 & device0=1 if !d.name eq 'PS' then begin ; Convert to pseudo pixel xx0 = xx0 / float(xsiz_pix) * !d.x_size ;- coordinates for PostScript xx1 = xx1 / float(xsiz_pix) * !d.x_size ;- output. yy0 = yy0 / float(ysiz_pix) * !d.y_size yy1 = yy1 / float(ysiz_pix) * !d.y_size endif endif else begin ; Not /tv2, simply pass to arrow norm0 = keyword_set(norm) data0 = keyword_set(data) device0 = keyword_set(device) endelse ;-- if /device then unset /norm & /data if keyword_set(device0) then begin norm0=0b & data0=0b endif arrow,xx0,yy0,xx1,yy1,thick=thick,hthick=hthick,solid=solid, $ color=color,hsize=hsize,norm=norm0,data=data0 !p.psym = psym_save if keyword_set(qstop) then stop end