# Appendix B: Examples

## B.1 Demonstration of CURVE

                PROGRAM EXA_1
          C     USE DISLIN         for Fortran 90!
                PARAMETER (N=301)
                DIMENSION XRAY(N),Y1RAY(N),Y2RAY(N)

                PI=3.1415926
                FPI=PI/180.
                STEP=360./(N-1)

                DO I=1,N
                  XRAY(I)=(I-1)*STEP
                  X=XRAY(I)*FPI
                  Y1RAY(I)=SIN(X)
                  Y2RAY(I)=COS(X)
                END DO

                CALL DISINI
                CALL PAGERA
                CALL COMPLX

                CALL AXSPOS(450,1800)
                CALL AXSLEN(2200,1200)

                CALL NAME('X-axis','X')
                CALL NAME('Y-axis','Y')

                CALL LABDIG(-1,'X')
                CALL TICKS(10,'XY')

                CALL TITLIN('Demonstration of CURVE',1)
                CALL TITLIN('SIN(X), COS(X)',3)

                CALL GRAF(0.,360.,0.,90.,-1.,1.,-1.,0.5)
                CALL TITLE

                CALL COLOR('RED')
                CALL CURVE(XRAY,Y1RAY,N)
                CALL COLOR('GREEN')
                CALL CURVE(XRAY,Y2RAY,N)

                CALL COLOR('FORE')
                CALL DASH
                CALL XAXGIT

                CALL DISFIN
                END

Figure B.1: Demonstration of CURVE

Next | Previous | Contents