Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calling Gnuplot from FORTRAN

  1. Nov 24, 2009 #1
    hello. I have a fortran code that has data points as output.

    How do I get fortran to plot these data points using gnuplot?

    Is there a way to call the external program from within fortran?

    I am using fortran95, gfortran compiler. I'm on a windows machine, but
    I'm connected remotely to the Unix machines in the lab.


  2. jcsd
  3. Nov 25, 2009 #2
    Hi Abraham,

    Try using the "system" subroutine.

    Code (Text):
    CALL SYSTEM(gnuplot )
    Whatever you put inside the parentheses gets passed to the command line (or terminal depending on your os.)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook