cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
	subroutine plt7(mxlen,mxser,tmpf,tify,tn,nc,string,iter)
c more pasta
	integer mxlen,mxser,nc         !nc=number of curves to plot
	integer tify(mxser),tn(mxser)  !tify=array of initial years. tn=array containing the # of elements in the first dim. of tmpf(mxlen,mxser)
	real*4 tmpf(mxlen,mxser)       !curves to plot tmpf(1-tn(i),1-nc)  where i goes from 1,nc
	character string*35            !plot title string
c
c local decs
	integer red,blue,green
	integer p,j,k
	real*4 minx,maxx,fmin,fmax
	real*4 wrk1(5000),wrk2(5000)  !must equal mxlen in calling program
	character ans*1,filename*9,dev*80
	logical ok,bg
c
       dev='Mac1';ok=.true.
       red=255;green=255;blue=255
       bg=.false.
c
	minx=9999.;maxx=-9999.;fmin=9999.;fmax=-9999.
	do p=1,nc
	    do j=1,tn(p)
		if(tmpf(j,p).gt.fmax)fmax=tmpf(j,p)
		if(tmpf(j,p).lt.fmin)fmin=tmpf(j,p)
	    enddo
	  if(tify(p).lt.int(minx))minx=real(tify(p))
	  if( ((tify(p)+tn(p))-1).gt.int(maxx))maxx=real( ((tify(p)+tn(p))-1) )
	enddo	
c
10	if(ok)call plsdev(dev)
c
c set background color
c
      if(.not.bg)then
        call plscol0(0,255,255,255)              !change default color map black>white 
        call plscol0(15,0,0,0)                   !change default color map white>black
        call plscolbg(red,green,blue)            !change background color if other than white is desired
      elseif(bg)then
        call plscol0(15,255,255,255)             !change default color map white>black
        call plscol0(0,0,0,0)                    !change default color map black>white
        call plscolbg(red,green,blue)            !change background color if other than white is desired
      endif  
c	
c initialize plplot
	call plinit()
	call plssub(1,1)
c
       call plwid(2)
	call plcol(15)   !color box and lables
	call plenv(minx,maxx,fmin,fmax,0,0)
	call pllab('Year','Curves',string)
	call plcol(1); call plwid(1)
       do p=1,nc
          k=1
          do j=1,tn(p)
               wrk1(k)=tmpf(j,p)
               wrk2(k)=real((tify(p)+j)-1)
               k=k+1
          enddo
	   call plline(tn(p),wrk2,wrk1)
	enddo
c
c	
20	call plend()	    	    
c	
       ans='C '
	dev='Mac1'
       write(*,'(/1x,''|************* plot options menu ***************|'')')
       write(*,'(1x,''|-----------------------------------------------|'')')
       write(*,'(1x,''|       [s]ave   <[c]ontinue>   [r]eplot        |'')') 
       write(*,'(1x,''|_______________________________________________|'')')
       write(*,'(/1x,'' enter option number > '',$)')
       read(*,'(a1)')ans
       if((ans.eq.'S').or.(ans.eq.'s'))then
         dev='psc';ok=.false.;filename='plt7.ps'
	  call plsdev(dev)
         call plsfnam(filename)
         goto 10
       elseif((ans.eq.'R').or.(ans.eq.'r'))then
         ok=.true.
         goto 10
       elseif((ans.eq.'C').or.(ans.eq.'c').or.(ans.eq.' ').or.
     *                             (ans.eq.'Y').or.(ans.eq.'y'))then
         return
	endif
c
	return
	end
c
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
