

 	subroutine plottaDEM(dev1,xint,yteor,title)
	dimension yteor(100),xint(100),er1(100)
        common/demmesh/ xt0(100),hhcf0(100)
        common/cfff/nnodi,hcf(100),xt(100)
	common/rd/rstar,dstar
        character*80 title
	ddrr=(dstar/rstar)**2
	do i=1,100
	hcf(i)=hcf(i)+alog10(ddrr)
	hhcf0(i)=hhcf0(i)+alog10(ddrr)
	yteor(i)=yteor(i)+alog10(ddrr)
	end do
34567   write(*,*)' enter limits :xmin,xmax,ymin,ymax'
        read(*,*)xmin,xmax,ymin,ymax
c        call plotta(dev1,xt,hcf,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,0)
c        call plotta(dev1,xt0,hhcf0,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,3)
c        call plotta(dev1,xint,yteor,er1,50,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,1)
c        call plotta(dev1,xt,hcf,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,2)
        read(*,'(a)')yesno
        write(*,*)'do you want change limits? y/n'
        read(*,110)yesno
110	format(a1)
        if(yesno.eq.'y')then
        go to 34567
        end if
        write(*,*)'do you want plot on laser? y/n'
        read(*,110)yesno
        if(yesno.eq.'y')then
c        call plotta('ps',xt,hcf,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,0)
c        call plotta('ps',xt0,hhcf0,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,3)
c        call plotta('ps',xint,yteor,er1,50,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,1)
c        call plotta('ps',xt,hcf,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,2)
        end if

	return
	end



	subroutine plottaDEM1(dev1,xint,yteor,title)
	dimension yteor(100),xint(100),er1(100)
        common/demmesh/ xt0(100),hhcf0(100)
        common/cfff/nnodi,hcf(100),xt(100)
	common/rd/rstar,dstar
        character*80 title
	ddrr=(dstar/rstar)**2
	area=4.*3.14*rstar**2
	do i=1,100
	hcf(i)=hcf(i)+xt(i)+alog10(area)
	hhcf0(i)=hhcf0(i)+xt0(i)+alog10(area)
	yteor(i)=yteor(i)+xint(i)+alog10(area)
	end do
34567   write(*,*)' enter limits :xmin,xmax,ymin,ymax'
        read(*,*)xmin,xmax,ymin,ymax
c        call plotta(dev1,xt,hcf,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.* T',title,0)
c        call plotta(dev1,xt0,hhcf0,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,3)
c        call plotta(dev1,xint,yteor,er1,50,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,1)
c        call plotta(dev1,xt,hcf,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,2)
        read(*,'(a)')yesno
        write(*,*)'do you want change limits? y/n'
        read(*,110)yesno
110	format(a1)
        if(yesno.eq.'y')then
        go to 34567
        end if
        write(*,*)'do you want plot on laser? y/n'
        read(*,110)yesno
        if(yesno.eq.'y')then
c        call plotta('ps',xt,hcf,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,0)
c        call plotta('ps',xt0,hhcf0,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,3)
c        call plotta('ps',xint,yteor,er1,50,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,1)
c        call plotta('ps',xt,hcf,er1,nnodi,xmin,xmax,ymin,ymax,' T '
c     +                  ,'D.E.M.',title,2)
        end if

	return
	end

