## 14.3 Examples

                PROGRAM EX14_2
                PARAMETER (N=100)
                DIMENSION ZMAT(N,N)

                STEP=1.2/(N-1)
                DO I=1,N
                  X=0.4+(I-1)*STEP
                  DO J=1,N
                    Y=0.4+(J-1)*STEP
                    ZMAT(I,J)=(X**2.-1.)**2. + (Y**2.-1.)**2.
                  END DO
                END DO

                CALL SETPAG('DA4P')
                CALL DISINI
                CALL PAGERA
                CALL COMPLX

                CALL MIXALF
                CALL TITLIN('Contour Plot',1)
                CALL TITLIN('F(X,Y) = (X[2$ - 1)[2$ + (Y[2$ - 1)[2$',3)
                CALL NAME('X-axis','X')
                CALL NAME('Y-axis','Y')

                CALL AXSPOS(450,2670)
                CALL GRAF(0.4,1.6,0.4,0.2,0.4,1.6,0.4,0.2)

                DO I=1,12
                  ZLEV=0.1+(I-1)*0.1
                  IF(MOD(I,3).EQ.1) THEN
                    CALL SOLID
                    CALL THKCRV(3)
                  ELSE IF(MOD(I,3).EQ.2) THEN
                    CALL DASH
                    CALL THKCRV(1)
                  ELSE
                    CALL DOT
                    CALL THKCRV(1)
                  END IF

                  CALL CONMAT(ZMAT,N,N,ZLEV)
                END DO

                CALL HEIGHT(50)
                CALL TITLE
                CALL DISFIN
                END

Figure 14.2: Contour Plot