program main !*****************************************************************************80 ! !! DISLIN_EX12 demonstrates a shaded contour plot. ! ! Modified: ! ! 05 September 2005 ! use dislin implicit none integer, parameter :: n = 50 integer :: i integer :: j real :: step real :: x real, dimension (n) :: xray real :: y real, dimension (n) :: yray real, dimension (12) :: zlev real, dimension (n,n) :: zmat write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'DISLIN_EX12:' write ( *, '(a)' ) ' FORTRAN90 version' write ( *, '(a)' ) ' Demonstrate the creation of ' write ( *, '(a)' ) ' a shaded contour plot.' step = 1.6 / real ( n - 1 ) do i = 1, n x = real ( i - 1 ) * step xray(i) = x do j = 1, n y = real ( j - 1 ) * step yray(j) = y zmat(i,j) = ( x * x - 1.0 )**2 + ( y * y - 1.0 )**2 end do end do ! ! Specify the format of the output file. ! call metafl ( 'PNG' ) ! ! Specify the name of the output graphics file. ! call setfil ( 'dislin_ex12.png' ) ! ! Set up the plot. ! call setpag ( 'da4p' ) call disini ( ) call pagera ( ) call complx ( ) call mixalf ( ) call titlin ( 'Shaded 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 shdmod ( 'poly', 'contur' ) call axspos ( 450, 2670 ) call graf ( 0.0, 1.6, 0.0, 0.2, 0.0, 1.6, 0.0, 0.2 ) do i = 1, 12 zlev(13-i) = 0.1 + real( i - 1 ) * 0.1 end do call conshd ( xray, n, yray, n, zmat, zlev, 12 ) call height ( 50 ) call title ( ) call disfin ( ) write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'DISLIN_EX12:' write ( *, '(a)' ) ' Normal end of execution.' stop end