;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;NAME:
;	no_data_notice
;PURPOSE:
;	Put a character notice up in place of a plot
;	(Useful for cases where automated plot routines
;	may fail for lack of data or other reasons).
;	Understands !P.MULTI, so you can use it instead 
;	of a plot command.
;HISTORY:
;	Written 14-Oct-98 C. DeForest
;USAGE:
;	no_data_notice,["line1","line2","line3",...]
;INPUT PARAMETERS:
;	s - an array of strings, one per line, to be drawn in the plot
;	    window
;INPUT KEYWORDS:
;	charsize - passthrough to XYOUTS (defaults to *2.0* instead of 1.0)
;	charthick- passthrough to XYOUTS (defaults to *2.0* instead of 1.0)
;-
pro no_data_notice,s,charsize=csiz,charthick=cthk
if not isvalid(csiz) then csiz=2.0
if not isvalid(cthk) then cthk=csiz

w = !d.x_size
h = !d.y_size

nvert = !p.multi(2)
nhoriz = !p.multi(1)

plotw = w/nhoriz
ploth = h/nvert

if(!p.multi(0) eq 0) then begin
	a = bytarr(w,h)
	tv,a
	delvarx,a
	!p.multi(0) = nvert*nhoriz
end

plotno = nvert * nhoriz - !p.multi(0)
if(!p.multi(4) eq 0) then begin
	x0 = plotw * (plotno mod  nhoriz)
	y0 = ploth * (plotno  /   nhoriz)
end else begin
	x0 = plotw * (plotno  /  nvert)
	y0 = ploth * (plotno mod nvert)
end

for i=0,n_elements(s)-1 do $
xyouts,x0+plotw/2,y0+ploth/2+(n_elements(s)*1.5*!d.y_ch_size*csiz)/2 - i*1.5*csiz*!d.y_ch_size,charsize=csiz,charthick=cthk,s(i),/device,color=255,align=0.5
for i=10,22,3 do plots,x0+[i,plotw-i,plotw-i,i,i],y0+[i,i,ploth-i,ploth-i,i],/device,color=255

!p.multi(0) = !p.multi(0) - 1

end

