set autoscale
set samples 10000
set xra [3353:3363]
set xla "B (G)"
set yla "Intenzitas"
f(x) = (-2*A/w**2)*((x-B0)/((1+((x-B0)/w)**2)**2)) + d + g*x
A = 20000
w = 1.9
B0 = 3358.2
d=8269
g=-0.07
fit [3353:3363] f(x) "kkmmn2" via d,A,w,B0,g
plot f(x) t "Illesztett gorbe" lw 3, "kkmmn2" u 1:2 t "Mert pontok" w l lw 3
set output 'mnnagy.eps'
set term po enh co
replot
set output
set term wxt