c******************************************************************************
      subroutine plotgeo
      common /pscale/ xmin,xmax,zmin,zmax
      common /magdata/ n,amin,amax,x(512),z(512),a(512)
      common /plot/ dxp(2),dyp(2),xpix,ypix,xscale,yscale
      character*5 name,den,sus
      ytop=dyp(2)-0.3*yscale
  161 read(10,204,end=162) name,den,sus,x1,x2
  204 format(3a5,2f10.4)
      if(x2.lt.xmin.or.x1.gt.xmax) go to 161
      if(name.eq.'fault'.or.name.eq.'thfrt'.or.name.eq.'thflf') then
        call line(x1,ytop,1,0,808)
        call line(x1,0.0,1,1,808)
      else if(name.eq.'coflt'.or.name.eq.'cotrt'.or.name.eq.'cotlf')
     1  then
        call line(x1,ytop,1,0,811)
        call line(x1,0.0,1,1,811)
      else
        call line(x1,ytop,1,0,800)
        call line(x1,0.0,1,1,800)
        call line(x2,ytop,1,0,800)
        call line(x2,0.0,1,1,800)
        x1=(x1+x2)/2.
        x2=dyp(2)/2.
        call vchar(x1,x2,name,5,2,.08,1.5708,0.,0.)
        x2=x2+dyp(2)/8.
        call vchar(x1,x2,den,5,302,.08,1.5708,0.,0.)
        x2=x2-dyp(2)/4.
        call vchar(x1,x2,sus,5,402,.08,1.5708,0.,0.)
      endif
      if(name.eq.'thfrt'.or.name.eq.'cotrt') then
        do 170 i=1,10
        y=ytop-0.5*i*yscale
        if(y.ge.0.) go to 161
  170   call vchar(x1,y,60,1,801,.1,3.0,-.05,0.)
      endif
      if(name.eq.'thflf'.or.name.eq.'cotlf') then
        do 171 i=1,10
        y=ytop-0.5*i*yscale
        if(y.ge.0.) go to 161
  171   call vchar(x1,y,60,1,801,.1,0.,-.05,0.)
      endif
      go to 161
  162 close(10)
      return
      end
c******************************************************************************
      subroutine plotsect
      common /pscale/ xmin,xmax,zmin,zmax
      common /magdata/ n,amin,amax,x(512),z(512),a(512)
      common /plot/ dxp(2),dyp(2),xpix,ypix,xscale,yscale
      character*5 name,den,sus
      ytop=dyp(2)-0.3*yscale
      read(10,*,end=162) x1,z1,flag1
      call line(x1,z1,1,0,800)
  161 read(10,*,end=162) x2,z2,flag2
c  204 format(3a5,2f10.4)
      if(flag2.eq.flag1) then
        call line(x2,z2,1,1,800)
      else
        call line(x2,z2,1,0,800)
      endif
      x1=x2
      z1=z2
      flag1= flag2
      go to 161
  162 close(10)
      return
      end

