run_gnuplot Subroutine

public subroutine run_gnuplot(command_file_name)

RUN_GNUPLOT runs GNUPLOT with a given command file.

Arguments

Type IntentOptional Attributes Name
character(len=*) :: command_file_name

Called by

proc~~run_gnuplot~~CalledByGraph proc~run_gnuplot run_gnuplot proc~test01 test01 proc~test01->proc~run_gnuplot proc~test02 test02 proc~test02->proc~run_gnuplot proc~test03 test03 proc~test03->proc~run_gnuplot proc~test04 test04 proc~test04->proc~run_gnuplot proc~test05 test05 proc~test05->proc~run_gnuplot proc~test06 test06 proc~test06->proc~run_gnuplot program~test_gnufor test_gnufor program~test_gnufor->proc~test01 program~test_gnufor->proc~test02 program~test_gnufor->proc~test03 program~test_gnufor->proc~test04 program~test_gnufor->proc~test05 program~test_gnufor->proc~test06

Source Code

subroutine run_gnuplot ( command_file_name )
!
!*******************************************************************************
!
!! RUN_GNUPLOT runs GNUPLOT with a given command file.
!
!
!  Discussion:
!
!    The GNUPLOT program, version 3.7, must be available.  To check whether
!    this is so, try typing
!
!      which gnuplot
!
!    If the response is
!
!      gnuplot: command not found
!
!    then you're going to have to make GNUPLOT available.
!
!    At ISU, this may require that you issue the command
!
!      add gnu
!
!    You may need to set the environment variable GNUTERM:
!
!      setenv GNUTERM x11
!
!    so that GNUPLOT automatically displays to your X window terminal.
!
!
!    This routine expects that there is a text file containing the appropriate
!    commands to GNUPLOT to display your picture.  There are a number of
!    routines in this package that will do this for simple plotting tasks.
!    Most of them require that you also set up a file of data to be plotted.
!
!    Once this routine invokes GNUPLOT, a graphics window should open
!    up, and the FORTRAN program will pause.  Hitting RETURN should advance
!    to the next picture, or terminate the window at the end, allowing the
!    FORTRAN routine to proceed.
!
!
!    You can look at the data and command files created by the routines.
!    Moreover, you can easily modify the command file to change the options
!    used in GNUPLOT, and then run GNUPLOT interactively, as in:
!
!      gnuplot commands
!
!    In particular, if you want a PostScript version of your graphics files,
!    insert the command "set term postscript" at the beginning of the command
!    file and run gnuplot as follows:
!
!      gnuplot commands > mypicture.ps
!
!    You will also have to hit RETURN once for each plot that is made.
!
!  Modified:
!
!    21 February 2001
!
!  Author:
!
!    John Burkardt
!
!  Parameters:
!
!    Input, character ( len = * ) COMMAND_FILE_NAME, the name of the
!    command file.
!
  implicit none
!
  character ( len = 512 ) command
  character ( len = * ) command_file_name
  !integer status
!
!  Issue a command to the system that will startup GNUPLOT, using
!  the file we just wrote as input.
!
  write ( command, * ) 'gnuplot ' // '"' // trim ( command_file_name ) // '"'
!~   call execute_command_line(trim ( command ), wait=.false., exitstat=status)
  call system(trim ( command ))

  return
endsubroutine run_gnuplot