      SUBROUTINE PLREST (XXX, YYY, M, N, INCTRL, IOCTRL, IZ)
      IMPLICIT NONE
C
C ***      RESTORE PLOTS AS SAVED BY SAVPLT
C
      INTEGER M, N, INCTRL, IOCTRL
      REAL XXX(M,N), YYY(M,N)
C
      INCLUDE MATLAB$KOM:SIZEPARMS.INC
C
      CHARACTER*1 IZ(VARSIZE)
C
      INCLUDE MATLAB$KOM:MATPLT.KOM
      INCLUDE MATLAB$KOM:PLT3D.KOM
      INCLUDE MATLAB$KOM:PLTXY.KOM
      INCLUDE MATLAB$KOM:BAR.KOM
      INCLUDE MATLAB$KOM:PLTCP.KOM
      INCLUDE MATLAB$KOM:PLTPP.KOM
      INCLUDE MATLAB$KOM:SAV.KOM
C
      INTEGER I, J, ISTRT, IEND, IERR
      CHARACTER*1 D3PL(328), XYPL(XYSIZ), BPPL(440), CPPL(376),
     .            POPL(PLSIZ)
      EQUIVALENCE (D3PL, XLAB3D), (XYPL, XLABXY), (BPPL, FGRPBP)
      EQUIVALENCE (XLABCP, CPPL), (RMAX, POPL)
C
C
      IF (INCTRL.EQ.0) THEN
        ISTRT = 1
        IEND = PLTMAX
      ELSE
        ISTRT = INCTRL
        IEND = INCTRL
      ENDIF
      DO 1000 I = ISTRT, IEND
        GO TO (100, 200, 300, 400, 500) IPLTYP(I)
        GO TO 1000
C
100     CONTINUE
        DO 110 J = 1, 328
          D3PL(J) = ISAV(I,J)
110     CONTINUE
        CALL D3PLOT (XXX, M, N, 1, IERR, IZ)
        GO TO 1000
C
200     CONTINUE
        DO 210 J = 1, XYSIZ
          XYPL(J) = ISAV(I,J)
210     CONTINUE
        CALL XYPLT (XXX, M, N, 1, IERR)
        GO TO 1000
C
300     CONTINUE
        DO 310 J = 1, 440
          BPPL(J) = ISAV(I,J)
310     CONTINUE
        CALL BARPLT (XXX, M, N, 1, IERR)
        GO TO 1000
C
400     CONTINUE
        DO 410 J = 1, 376
          CPPL(J) = ISAV(I,J)
410     CONTINUE
        CALL CONTUR (XXX, M, N, 1, IERR, IZ)
        GO TO 1000
C
500     CONTINUE
        DO 510 J = 1, PLSIZ
          POPL(J) = ISAV(I,J)
510     CONTINUE
        CALL POLPLT (XXX, YYY, M, N, 1, IERR, IZ)
C
1000  CONTINUE
C
      RETURN
      END
