![]() |
set fit logfile "linearfit.log" seed = rand(time(0)) unset key set table "linearfit.dat" f(x,a,b) = a*x + b A = 2.2; B = 3.5 plot f(x,A,B) + 3*(rand(0) - 0.5) unset table fit f(x,a,b) "linearfit.dat" via a,b set title sprintf("¿äÄêľÀþ: y = %.3fx + %.3f", a, b) font "IPAGothic,16" set grid set term pngcairo enh font "Times,10" size 480,360 set out "fit_linear.png" plot "linearfit.dat" pt 6 ps 0.4 lc rgb "#009900", f(x,a,b) lt 1 |