!     Program to test interpolation routines
!     Compare to DISSPLA example DMB005
      PROGRAM GPE7
      DIMENSION X(18),Y(18)
!  Initialize data for plots
      DATA X /0.00,0.50,1.25,1.75,2.25,2.75,3.00,3.25,3.50,
     1      3.75,4.25,4.50,4.75,5.00,5.25,5.50,5.75,6.00/
      DATA Y /0.40,0.90,1.00,0.73,0.30,0.22,1.50,0.30,0.20,
     1      0.95,0.30,0.90,0.25,0.50,1.00,0.13,0.97,0.48/
 
      CALL ORIENT('PORTRAIT')
      CALL GSTART
      CALL FONT('HELVETICA','NORMAL')
!  Establish plot area (Use default 8.5" X 11" page size)
      CALL AREA2D (6.,9.)
      CALL HEIGHT (.25)
      XL=XMESS ('Interpolation Types$',100)
      CALL MESSAG ('Interpolation Types$',100,3.-XL/2.,9.125)
      XL = XMESS('GPLOT Example 7$',100)
      CALL MESSAG('GPLOT Example 7$',100,3.-XL/2.,9.5)
      CALL RESET ('HEIGHT')
!  Turn on clipping at boundary of subplot area
      CALL GRACE (0.0)
      CALL GRAF (0.,1.,6.,0.,1.,1.5)
!  Draw a single line around plot area
      CALL GRID (0,0)
      CALL ENDGR(0)
!  Loop to draw all 6 interpolations
      DO 50 I=1,6
!  Shift up for next plot
      IF(I.NE.1) CALL OREL (0.,1.5)
      CALL AREA2D (6.,9.)            ! Redefine subplot area
      CALL GRAF (0.,1.,6.,0.,1.,1.5) ! Redefine axes data limits
!  Draw a secondary y axis (This restricts height of plot also)
      CALL YGRAXS (0.,.5,1.5,1.25,' ',0,0.,0.)
!  Draw horizontal line on each graph
      CALL RLVEC (0.,0.,6.,0.,0)
!  Set interpolation mode for each plot
      IF (I.EQ.1) CALL RASPLN(3.)
      IF (I.EQ.2) CALL SPLINE
      IF (I.EQ.3) CALL POLY3
      IF (I.EQ.4) CALL BARS(.25)
      IF (I.EQ.5) CALL STEP
      IF (I.EQ.6) CALL LINEAR
!  Draw interpolated curve
      CALL MARKER (I+12)     ! Set marker symbol
      IF (I.NE.4) CALL CURVE (X,Y,18,1)
      IF (I.EQ.4) CALL CURVE (X,Y,18,0)    ! (No markers on bar chart)
!  Write interpolation type
      IF (I.EQ.1) CALL MESSAG ('RASPLN',,.7,.3)
      IF (I.EQ.2) CALL MESSAG ('SPLINE$',100,.7,.3)
      IF (I.EQ.3) CALL MESSAG ('POLY3$',100,.7,.3)
      IF (I.EQ.4) CALL MESSAG ('BARS$',100,.7,.3)
      IF (I.EQ.5) CALL MESSAG ('STEP$',100,.7,.3)
      IF (I.EQ.6) CALL MESSAG ('LINEAR$',100,.7,.3)
      CALL ENDGR(0)
 50   CONTINUE
      CALL ENDPL (0)
     
      CALL GSTOP
      CALL EXIT
      END
