artmenlope / fortran90-call-gnuplot-test

This is a test to try calling Gnuplot from a Fortran 90 script.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fortran90-call-gnuplot-test

This is a test to try calling Gnuplot from a Fortran 90 script. The compiler used is GFortran.

The main program generates 3D data of the function

$$ f(x, y) = \cos\left(x^2+y^2\right) + \sin\left(x+y\right) $$

in a suitable format for Gnuplot storing it in the file data.txt. Then, it calls Gnuplot for plotting the generated data using the commands from the file gnuplot_script.plt.

The resulting plot is

For the making of the main program the following references have been consulted:

  1. Engel, P., 2020. Gnuplot | Programming In Modern Fortran. [online] cyber.dabamos.de, The Cyber Vanguard.

  2. Moin, P., 2002. Mathematical And Computational Methods For Engineers. Fortran 90 Tutorial: Subprograms. [online] web.stanford.edu, Standford University.

(Engel 2020) was consulted for the data file creation and gnuplot plotting from Fortran. (Moin 2002) was consulted for the creation of functions in Fortran 90.

About

This is a test to try calling Gnuplot from a Fortran 90 script.


Languages

Language:Fortran 82.7%Language:Gnuplot 17.3%