TEST03 plots parameter (X,Y,Z) data.
subroutine test03 ! !******************************************************************************* ! !! TEST03 plots parameter (X,Y,Z) data. ! implicit none ! integer, parameter :: n = 101 ! character ( len = 100 ) :: command_file_name = 'tmp/test03_commands.txt' character ( len = 100 ) :: data_file_name = 'tmp/test03_data.txt' integer i integer ierror integer, parameter :: nturn = 5 real, parameter :: r = 5.0E+00 real theta real x(n) real y(n) real z(n) real, parameter :: zmax = 10.0E+00 ! write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST03' write ( *, '(a)' ) ' To plot a (parametric) set of (X,Y,Z) data,' write ( *, '(a)' ) ' WRITE_XYZ_DATA writes the data file,' write ( *, '(a)' ) ' WRITE_XYZ_PLOT writes the plot command file.' do i = 1, n z(i) = zmax * real ( i - 1 ) / real ( n - 1 ) theta = ( 2.0E+00 * pi() ) * z(i) * real ( nturn ) / zmax x(i) = r * cos ( theta ) y(i) = r * sin ( theta ) end do call write_xyz_data ( data_file_name, n, x, y, z, ierror ) if ( ierror /= 0 ) then write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST03' write ( *, '(a,i6)' ) ' WRITE_XYZ_DATA returned IERROR = ', ierror end if call write_xyz_plot ( command_file_name, data_file_name, ierror ) if ( ierror /= 0 ) then write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST03' write ( *, '(a,i6)' ) ' WRITE_XYZ_PLOT returned IERROR = ', ierror end if call run_gnuplot ( command_file_name ) return endsubroutine test03