# fit関数の定義 (#はコメント行) f(x)=c*b*b/((x-a)*(x-a)+b*b)+d+e*x # fit結果のファイル名変更 set fit logfile "fit_test1.txt" # fitting実行 fit f(x) "inp_test1.txt" via a,b,c,d,e # グラフ出力先をpngファイルに set terminal png # グラフ出力ファイル名指定 set output "fig_test1.png" #グラフ出力 plot f(x),"inp_test1.txt" with points pointsize 2 pointtype 4 linetype 4