      SUBROUTINE SAVPLT (PLTP)
      IMPLICIT NONE
C
C ***      REMEMBER PLOT SETTINGS
C
      INTEGER PLTP
C
C PLTP IS TYPE OF PLOT:
C   1 = 3D PLOT
C   2 = X-Y PLOT OF ANY TYPE
C   3 = BAR PLOT (HISTOGRAM)
C   4 = CONTOUR PLOT
C   5 = POLAR PLOT
C
      INCLUDE MATLAB$KOM:SIZEPARMS.INC
      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
C
      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 (PLTCNT.EQ.0) PLTMAX = 0
      PLTCNT = PLTCNT+1
      IF (PLTCNT.GT.10) PLTCNT = 1
      IF (PLTMAX.LE.10) PLTMAX = PLTCNT
      IPLTYP(PLTCNT) = PLTP
      GOTO (100, 200, 300, 400, 500) PLTP
      GO TO 900
C
100   CONTINUE
      DO 110 I = 1, 328
        ISAV(PLTCNT,I) = D3PL(I)
110   CONTINUE
      GO TO 900
C
200   CONTINUE
      DO 210 I = 1, XYSIZ
        ISAV(PLTCNT,I) = XYPL(I)
210   CONTINUE
      GO TO 900
C
300   CONTINUE
      DO 310 I = 1, 440
        ISAV(PLTCNT,I) = BPPL(I)
310   CONTINUE
      GO TO 900
C
400   CONTINUE
      DO 410 I = 1, 376
        ISAV(PLTCNT,I) = CPPL(I)
410   CONTINUE
      GO TO 900
C
500   CONTINUE
      DO 510 I = 1, PLSIZ
        ISAV(PLTCNT,I) = POPL(I)
510   CONTINUE
C
900   CONTINUE
      RETURN
      END
