	subroutine shdrect
c
c	shades a rectangle in a given regiond
c
c	ntype=0:  Time (x) vs Y (axis units)
c	ntype=1:  x and y are both inches
c
	dimension iaxdat(5),laxdat(5),idate(5),ldate(5)
	dimension x1(2),y1(2),x2(2),y2(2)
c
c
	read(5,*) nrect,ntype,xx,yy
	call area2d(xx,yy)
	xmin=0.0
	if(ntype.eq.0) then
	read(5,*) iaxdat,laxdat,ymin,ymax
	xmax=delday(iaxdat,laxdat)
	else
	xmax=xx
	ymin=0.0
	ymax=yy
	endif
	xdel=xmax
	ydel=ymax-ymin
	call graf(xmin,xdel,xmax,ymin,ydel,ymax)
	do nr=1,nrect
	if(ntype.eq.0) then
	read(5,*) idate,ldate,ybot,ytop,ishade
	xlft=delday(iaxdat,idate)
	xrgt=delday(iaxdat,ldate)
	else
	read(5,*) xrgt,xlft,ybot,ytop,ishade
	endif
	x1(1)=xlft
	x2(1)=xlft
	x1(2)=xrgt
	x2(2)=xrgt
	y1(1)=ybot
	y1(2)=ybot
	y2(1)=ytop
	y2(2)=ytop
	call shdpat(ishade)
	call shdcrv(x1,y1,2,x2,y2,2)
	enddo
	return
	end
