# Appendix B: Examples

## B.11 3-D Bar Graph / 3-D Pie Chart

                PROGRAM EXA_11
          C     USE DISLIN         for Fortran 90!
                CHARACTER*80 CBUF
                REAL XRAY(5),Y1RAY(5),Y2RAY(5)
                INTEGER IC1RAY(5),IC2RAY(5)
                DATA XRAY/2.,4.,6.,8.,10./,Y1RAY/0.,0.,0.,0.,0./,
               *     Y2RAY/3.2,1.5,2.0,1.0,3.0/
                DATA IC1RAY/50,150,100,200,175/,
               *     IC2RAY/50,150,100,200,175/

                CALL METAFL('POST')
                CALL SETPAG('DA4P')
                CALL DISINI
                CALL PAGERA
                CALL HWFONT

                CALL TITLIN('3-D Bar Graph / 3-D Pie Chart', 2)
                CALL HTITLE(40)

                CALL SHDPAT(16)
                CALL AXSLEN(1500,1000)
                CALL AXSPOS(300,1400)

                CALL BARWTH(0.5)
                CALL BARTYP('3DVERT')
                CALL LABELS('SECOND','BARS')
                CALL LABPOS('OUTSIDE','BARS')
                CALL LABCLR(255,'BARS')
                CALL GRAF(0.,12.,0.,2.,0.,5.,0.,1.)
                CALL TITLE
                CALL COLOR('RED')
                CALL BARS(XRAY,Y1RAY,Y2RAY,5)
                CALL ENDGRF

                CALL SHDPAT(16)
                CALL LABELS('DATA','PIE')
                CALL LABCLR(255,'PIE')
                CALL CHNPIE('NONE')
                CALL PIECLR(IC1RAY,IC2RAY,5)
                CALL PIETYP('3D')
                CALL AXSPOS(300,2700)
                CALL PIEGRF(CBUF,0,Y2RAY,5)
                CALL DISFIN
                END

Figure B.11: Demonstration of CURVE

Next | Previous | Contents