program main !*****************************************************************************80 ! !! DISLIN_EX07 demonstrates demonstrates 3D bar graphs and pie charts. ! ! Modified: ! ! 05 September 2005 ! use dislin implicit none character ( len = 80 ) :: cbuf integer, dimension (5) :: ic1ray = (/ 50, 150, 100, 200, 175 /) integer, dimension (5) :: ic2ray = (/ 50, 150, 100, 200, 175 /) real, dimension (5) :: xray = (/ 2.0, 4.0, 6.0, 8.0, 10.0 /) real, dimension (5) :: y1ray = (/ 0.0, 0.0, 0.0, 0.0, 0.0 /) real, dimension (5) :: y2ray = (/ 3.2, 1.5, 2.0, 1.0, 3.0 /) write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'DISLIN_EX07:' write ( *, '(a)' ) ' FORTRAN90 version' write ( *, '(a)' ) ' Demonstrate the creation of 3D bar ' write ( *, '(a)' ) ' and pie charts.' ! ! Specify the format of the output file. ! call metafl ( 'PNG' ) ! ! Specify the name of the output graphics file. ! call setfil ( 'dislin_ex07.png' ) ! ! Set up the plot. ! 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.0, 12.0, 0.0, 2.0, 0.0, 5.0, 0.0, 1.0 ) 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 ( ) write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'DISLIN_EX07:' write ( *, '(a)' ) ' Normal end of execution.' stop end