set key right bottom

#set size .9,.85

set fit errorvariables
set ylabel "$N$"
set xlabel "$\\frac{E}{\\mathrm{keV}}$"

set decimalsign ','
set samples 50000

set xtic 500
#set ytics 1

set logscale y

plot [0:3000] 'spektrumP1.dat' using 1:2 lt 1 notitle

set terminal latex
set out "grafspektrumP1.tex"
replot
set out
set term win

set print "fitspektrumP1.txt"
#print "   f(x) = Ax^2 + Bx + C"
#print A, " +/- ", A_err, ",   rel. chyba ", abs(A_err/A*100), " %"
#print B, " +/- ", B_err, ",   rel. chyba ", abs(B_err/B*100), " %"
#print C, " +/- ", C_err, ",   rel. chyba ", abs(C_err/C*100), " %"
set print


unset logscale y
