How to Call Gnuplot from Fortran to Plot Data Points?

  • Context: Fortran 
  • Thread starter Thread starter Abraham
  • Start date Start date
  • Tags Tags
    Fortran Gnuplot
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 18K views
Abraham
Messages
68
Reaction score
0
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.

Thanks,

Abraham
 
Physics news on Phys.org
Hi Abraham,

Try using the "system" subroutine.

Code:
CALL SYSTEM(gnuplot )

Whatever you put inside the parentheses gets passed to the command line (or terminal depending on your os.)