Viewing contents of file '../idllib/uit/pro/coordplot.pro'
PRO coordplot,xorig,yorig,xdelt,ydelt,mag =mag, window = wdow,title=title $
	     ,large = large, hardcopy = hc
;+
;  NAME
;	COORDPLOT
;  PURPOSE
;	Compares two sets of coordinates by plotting vectors between original
;	and final positions.  Results are plotted on an IDL plot window.
;  CALLING SEQUENCE
;	Coordplot, First_x, First_y, Second_x, Second_y [,window = w, mag = m, $
;			/large, /hardcopy, title= t]
;  INPUTS:
;	First_x, First_y: Vectors containing X and Y coordinates of points in
;			  the first image
;	Second_x, Second_y: vectors containing X and Y coodinates of points in
;			  the second image.  SEE RESTRICTIONS.
;  OPTIONAL INPUTS:
;	Window:   Specify IDL Window number.  If no number is specified, routine
;		  selects a currently free window.
;	Mag:      Specify magnitude of differential vectors.  Default is x10.
;	Large:    Output window is 824 x 824 pixels.  Default is 512 x 512
;	Hardcopy: If present and non-zero, routine will automatically print
; 		  out the coordplotted window (intended for use with the LARGE 
;		  keyword).  This uses the TVLASER routine.  See TVLASER for 
;		  more details.
;	Title:    Specify title of plot for hardcopy
;  OUTPUTS:
;	None.
;  SIDE EFFECTS:
;	A plot window is created. 
;  RESTRICTIONS:
;	First_x, First_y, Second_x, Second_y must all be one-dimensional arrays
;       and all have the same number of elements.  There must be a one-to-one
;       relation between the points in the four sets (i.e. The Nth item of each
;	array must correspond to the same image data point in all four cases)
;   COMMON BLOCKS:
;	None.
;   MODIFICATION HISTORY
;	Created from scratch by Joel D. Offenberg, STX, Aug 1991
;	Based on a concept by Kanav Bhagat, STX.
;-
IF not(keyword_set(window)) THEN begin
	window,/free
	wdow = !window
     endIF
If keyword_set (large) THEN begin
	window,wdow,xsize=824,ysize= 824
	chan,wdow
endIF ELSE chan,wdow,/plot
IF not(keyword_set(mag)) THEN mag = 10. 
IF not(keyword_set(title)) THEN title = ''

plot,xorig,yorig,psym = 6,symsize = 0.75, xstyle =3, ystyle = 3, font =3
xm = xorig -(xorig - xdelt)*mag
ym = yorig -(yorig - ydelt)*mag

N = n_elements(xorig)
for I = 0,n-1 do begin
   xvect = [xorig(I),xm(I)]
   yvect = [yorig(I),ym(I)]
  oplot,xvect,yvect,psym = 0
endFOR
IF keyword_SET(hc) then $
	tvlaser,/rev,/port,title = title
end