      Subroutine logplt (x,y,ye,n,ne,chart,yminx)
c *** see RH Landau, Program lpott, 1981, ridge mod 2/86
c     semi-log graphing on printer,from pirk,modified by rhl
c      x(i),y(i) are cartesian coordinates to be plotted
c     on standard size 5cycle graph paper
c     ne gt 0 also causes ye to be plotted on same graph
c     ne lt o for non log polar plot
      Implicit  Real*8   (a-h,o-z)
      Real*4 rrjx
      Dimension x(1), y(1), chart(61,61), xf(11), ye(1), plot(10), nplot
     1(30)
c      ymin must be lowest power of 10, e.g. -2.,or 3.
c         but not smallest value of y
c
      data plus,pt,blank,ex/1h+,1h.,1h ,1h0/,aminus,point/1h-,1h+/
     1,nit/0/
      If (nit.ne.0) GoTo 20
      Do 10 i=1,29
         j = i-7
         If (i.le.7) plot(i) = chart(i,1)
         If (i.gt.7) nplot(j) = chart(i,1)
 10   Continue
 20   nit = 1
      xmin = 0
      xmax = 180.
      ymin = yminx
      ymax = ymin+5.
c     polarization
      If (ne.lt.0) ymin = -1.
      If (ne.lt.0) ymax = 1.5
      rs = 60./(ymax-ymin)
      mm = 6
c     construct graph
      Do 30 i=1,61
         Do 30 j=1,61
            chart(j,i) = blank
 30   Continue
      Do 40 i=1,61,10
         Do 40 j=1,61,1
            chart(j,i) = pt
 40   Continue
      Do 50 k=1,mm
         i = (k-1)*rs+1.1
         If (i.gt.61) i = 61
         Do 50 j=1,61,2
            chart(i,j) = pt
 50   Continue
c     place data on graph
      xlen = (xmax-xmin)/60.
      ylen = (ymax-ymin)/60.
      Do 70 i=1,n
         rhl1 = x(i)
         If (rhl1.gt.xmax) rhl1 = xmax
         If (rhl1.lt.xmin) rhl1 = xmin
         rrjx = (rhl1-xmin)/xlen
         jx = Ifix(rrjx)
         If (jx.gt.60) jx = 60
         point = plus
         If (y(i).le.0.) point = aminus
         rhl = y(i)
         If (ne.lt.0) GoTo 60
         y(i) = abs(y(i))
         If (y(i).eq.0.) y(i) = 10.**ymin
         rhl = log10(y(i))
 60      Continue
         If (rhl.lt.ymin) rhl = ymin
         If (rhl.gt.ymax) rhl = ymax
         rrjx = (rhl-ymin)/ylen
         iy = Ifix(rrjx)
         If (iy.gt.60) iy = 60
         chart(61-iy,1+jx) = point
         If (ne.le.0) GoTo 70
         If (ye(i).le.0.0) ye(i) = 10.**ymin
         rhl = log10(ye(i))
         If (rhl.lt.ymin) rhl = ymin
         If (rhl.gt.ymax) rhl = ymax
         rrjx = (rhl-ymin)/ylen
         iy = Ifix(rrjx)
         If (iy.gt.60) iy = 60
         point = chart(61-iy,1+jx)
         If ((point.eq.plus).or.(point.eq.aminus)) GoTo 70
         chart(61-iy,1+jx) = ex
 70   Continue
c     print graph
      If (ne.ge.0) Write (6,110) 
      If (ne.ge.0) Write (6,111) plot(1),(nplot(ii),ii=1,22)
      If (ne.lt.0) Write (6,110) 
      If (ne.lt.0) Write (6,121) plot(1),(nplot(ii),ii=1,22)
      xlen = xlen*100./10.
      ylen = ylen*60./10.
      ymin = ymax
      If (ne.ge.0) ymin = 10.**ymax
      Do 90 i=1,55,6
         Write (6,130) ymin,(chart(i,j),j=1,61,1)
         If (i.eq.1) Write (6,150) (plot(ii),ii=2,7)
         ymax = ymax-ylen
         If (ne.ge.0) ymin = 10.**ymax
         ip1 = i+1
         ip5 = i+5
         Do 80 i1=ip1,ip5
            Write (6,140) (chart(i1,j),j=1,61,1)
 80      Continue
 90   Continue
      Write (6,130) ymin,(chart(61,j),j=1,61)
      Do 100 i=1,7
         xf(i) = xmin
         xmin = xmin+xlen
 100  Continue
      Return
c
 110  format (1h1)
 111  format (1h+,7hsig(th),f6.1,2i4,4x,i1,i2,8i1,10i3)
 121  format (1h+,6h polar,f6.1,2i4,4x,i1,i2,8i1,10i3)
 130  format (1h ,e8.2,101a1)
 140  format (9x,101a1)
 150  format (1h+,20x,6f7.3)
      End
