        subroutine KINPLT(KOUNT,SELECT,NSEL,TABLE,OUTPUT,TYPEG
     &,CHEMNA,ECONAM,PMAX,PMIN,MCHEMG)
      include 'SIZE.INC'
      include 'UNITS.INC'
      real TABLE(132),OUTPUT(7),PMAX(7),PMIN(7),TN(4),TFACTR
      real X,XROW,XCOL,XMIN,XRANGE,Y,YMIN,YMAX,YRANGE
      real YINC,XK,XINC
      integer IX,IY
      integer IERR,KOUNT,ICODE,MCHEMG,INDEP,J,I,NSEL,IT,IHIT
      integer COL,ROW,SELECT(7),XANNOT,YANNOT
        character AREA(16)*51, TYPEG(NPX)*1, CHEMNA*50, ECONAM*50
        character NAMEC*50, NAMES*50
        character CCHAR(10)*1, TUNIT(4)*6, BAR
        data CCHAR /'A','B','C','D','E','I','J','K','L','M'/
        data BAR /'I'/
        data ROW, COL, YANNOT, XANNOT /16, 51, 4, 11/
        data TUNIT/'Hours ','Days  ','Months','Years '/
        data TN /1.0, 24.0, 730.5, 8766./
      rewind PLTLUN(MACHNO)
      call KINHED (IERR,NAMEC,NAMES,KOUNT,TYPEG,ICODE,MCHEMG)
      if (IERR.eq.1) go to 190
      TFACTR = 1.0
      if (SELECT(1).eq.1) TFACTR = TN(ICODE)
      INDEP = 1
      do 100 J = 1, ROW
         AREA(J) = ' '
100   continue
      XROW = real(ROW-1)
      XCOL = real(COL-1)
      YMIN = 1.E30
      YMAX = -YMIN
      do 120 I = 1, NSEL
         if (I.eq.INDEP) go to 110
         Y = PMAX(I)
         if (Y.gt.YMAX) YMAX = Y
         Y = PMIN(I)
         if (Y.lt.YMIN) YMIN = Y
         go to 120
110      continue
         XRANGE = PMAX(I)-PMIN(I)
         if (XRANGE.eq.0.0) XRANGE = 1.0
         XMIN = PMIN(I)
         IT = SELECT(INDEP)
120   continue
      YMIN = 0.0
      YRANGE = YMAX-YMIN
      if (YRANGE.eq.0.0) YRANGE = 1.0
      rewind PLTLUN(MACHNO)
      call KINHED (IERR,CHEMNA,ECONAM,KOUNT,TYPEG,ICODE,MCHEMG)
      if (IERR.eq.1) go to 150
130   continue
      call KINRED (IERR,KOUNT,TABLE,IHIT,MCHEMG)
      if (IERR.eq.2) go to 150
      if (IHIT.eq.0) go to 130
      X = TABLE(IT)
      IX = int((X-XMIN)/XRANGE*XCOL+1.5)
      do 140 I = 1, NSEL
         J = SELECT(I)
         if (J.eq.INDEP) go to 140
         Y = TABLE(J)
         IY = int((Y-YMIN)/YRANGE*XROW+1.5)
         IY = ROW-IY+1
         if (IY.lt.1.or.IY.gt.ROW.or.IX.lt.1.or.IX.gt.COL) write (TTYOUT
     &      (MACHNO),5000) IT,J,TABLE(IT),TABLE(J),IX,IY
5000  format (//' Plotting symbol out-of-range;'/' Independent variable:
     & ',I5/' Dependent variable  : ',I5/' Independent value   : ',G14.7
     &/' Dependent value     : ',G14.7/' IX,  IY             : ',2I5//)
         AREA(IY)(IX:IX) = CCHAR(I)
140   continue
      go to 130
150   continue
      write (TTYOUT(MACHNO),5010) NAMES
      write (TTYOUT(MACHNO),5020) NAMEC
5010  format (//' System:   ',A50)
5020  format (' Chemical: ',A50)
      YINC = YMAX/real(YANNOT-1)
      XK = 0.0
      do 170 I = 1, ROW
         if (mod(I,5).ne.1) go to 160
         Y = YMAX-XK*YINC
         if (I.eq.ROW) Y = 0.0
         XK = XK+1.0
         write (TTYOUT(MACHNO),5030) Y,BAR,AREA(I)(1:COL)
5030     format (1X,1PG10.3,1X,1A1,A)
         go to 170
160      continue
         write (TTYOUT(MACHNO),5040) BAR,AREA(I)(1:COL)
5040     format (12X,1A1,A)
170   continue
      write (TTYOUT(MACHNO),5050)
5050  format (13X,10('+----'),'+')
      XINC = XRANGE/real(XANNOT-1)
      do 180 I = 1, XANNOT
         TABLE(I) = XMIN+real(I-1)*XINC
         TABLE(I) = TABLE(I)/TFACTR
180   continue
      write (TTYOUT(MACHNO),5060) (TABLE(I),I=1,XANNOT,2)
      write (TTYOUT(MACHNO),5070) (TABLE(I),I=2,XANNOT,2)
5060  format (10X,1PG10.3,10(1PG10.3))
5070  format (15X,1PG10.3,10(1PG10.3))
      write (TTYOUT(MACHNO),5080) TUNIT(ICODE)
5080  format (32X,'Time, ',A6)
190   continue
      return
      end
