pro plot_3maps, map3, tit3, big_title, xyint, winsiz, txt=txt

; Usually plots three boxes. However, if  keyword, txt, is set,
; then plot first two maps & display txt in the rightmost box.
; This is known by the presence of keyword, txt.

;------------------------create things from inputs
m	= n_elements(map3[*,0,0])
x	=(findgen(m)-m/2)*xyint
xrang 	= [-1,1]*winsiz
yrang 	= [-1,1]*winsiz
xtit	='E-W [arcsec]'
ytit	='N-S [arcsec]'
;------------------------window size/pos stuff
xwt 	=790 & ywt =320
xw  	=245 & yw  =245
xpos	=[42,42+xw+3,42+2*xw+6]
ypos	=[30,  30,   30       ]
tpos	=[20,300]
yp0 	= ypos[0] & yp1=yp0+yw ; all the same for three boxes
gost	=intarr(51,51) & gost[0,0]=255 & gost=bytscl(gost)
notik	=[' ',' ',' ',' ',' ',' ',' ',' ',' ']
rlv    	=exp(alog(0.1)+alog(0.99/0.1)*findgen(6)/5.)
;------------------------launch a window
window,2,xs=xwt, ys=ywt
device,decompo=0
loadct,5
!p.multi=[0,3,1]
!p.charsize=1.8
!p.font=-1
;------------------------type the big title
xyouts,tpos[0],tpos[1],big_title,charsiz=2,charthic=2,/device
;------------------------plot the leftmost box
ipic=0
 xp0=xpos[ipic] & xp1=xp0+xw
 tv,gost,xp0,yp0,xs=xw,ys=yw,/device
 contour,map3[*,*,ipic],x,x,/noerase,/fill,nlev=16, $
    	pos=[xp0,yp0,xp1,yp1],/dev, $
	xtit=xtit,ytit=ytit,tit=tit3[ipic],$
	xr=xrang, yr=yrang, xst=1, yst=1
;------------------------plot the middle box
ipic=1
 xp0=xpos[ipic] & xp1=xp0+xw
 tv,gost,xp0,yp0,xs=xw,ys=yw,/device
 contour,map3[*,*,ipic],x,x,/noerase,/fill,nlev=16, $
    	pos=[xp0,yp0,xp1,yp1],/dev, $
	xtit=xtit,tit=tit3[ipic],ytickn=notik,$
	xr=xrang, yr=yrang, xst=1, yst=1
;------------The last box could be either a map or txt display
 ipic=2
 xp0=xpos[ipic] & xp1=xp0+xw
 tv,gost,xp0,yp0,xs=xw,ys=yw,/device
if NOT keyword_set(txt) then begin
 contour,map3[*,*,ipic],x,x,/noerase,/fill,nlev=16, $
    	pos=[xp0,yp0,xp1,yp1],/dev, $
	xtit=xtit,tit=tit3[ipic],ytickn=notik,$
	xr=xrang, yr=yrang, xst=1, yst=1
endif else begin
 nt=n_elements(txt) + 2 ; leave top & bottoom lines blnk
 dum=fltarr(nt,nt) & xt=findgen(nt) & yt=xt & tab=0.2*nt
 contour,dum,xt,yt,/noerase,/nodata, $
    	pos=[xp0,yp0,xp1,yp1],/dev,xst=5,yst=5
 for i=1,nt-2 do xyouts,tab,yt[nt-1-i],txt[i-1], /data, $
	charsize=1.2
endelse

return
end
