pro line, bin=bin, color=color

;+
; NAME
;	line
; PURPOSE
;	Draw a straight line on a window between 2 cursor clicked points
;         Printed coordinates will be in image coordinates.
;	  Plot is done in device coorinates.
; CALLING SEQUENCE
;	line [, bin=bin, color=color]
; OPTIONAL KEYWORD INPUT
;	bin - rebin factor
; HISTORY
;	LWA  22-JUN-94
;-


if n_elements(bin) eq 0 then bin=1
if n_elements(color) eq 0 then color=255
;
;
;    print, '* Use left button to mark the first point
;    print, '* Then use the right button to mark the second point & exit'

    xx=intarr(2) & yy=intarr(2)
    wait, 0.3
    cursor, x, y, /device
                print, 'Center location: ', x/bin, y/bin
                xx(0)=x & yy(0)=y  
    wait, 0.3
    cursor, x, y, /device
                print, 'Center location: ', x/bin, y/bin
                xx(1)=x & yy(1)=y

plots,xx,yy,/dev,color=color

end

