Fortranからgnuplotを直接呼び出して、グラフを作成する

ic.f90 ダウンロード

データの作成、gnuplotの呼び出し

arcsinh.f90 ダウンロード

関数の例

para.txt ダウンロード

ic.f90にあたえるパラメータ

makefile ダウンロード

$ make

if [ ! -d ../obj ]; then \

mkdir -p ../obj ; \

fi

make: Warning: File `ic.f90' has modification time 3.6e+02 s in the future

ifort -c -CB -traceback -fpe0 -module ../obj -c -o ../obj/ic.o ic.f90

ifort -o ic ../obj/ic.o ../obj/arcsinh.o -module ../obj

$ ic < para.txt

Program ic starts.

Output: ic_sample.txt

xmax= 55.000

dx= 1.000

nx= 55

gnuplot -persist < plot.gnu

Done program ic.