set key right bottom

#set size .9,.85

set fit errorvariables
set xlabel "$\\frac{I_m}{\\mathrm{mA}}$"
set ylabel "$\\frac{U_k}{\\mathrm{V}}$"

set decimalsign ','
set samples 5000

#set xtic 11
#set ytics 1

f(x) = A*x*x
fit f(x) 'pliki.dat' using 1:5 via A
plot 'pliki.dat' using 1:5:2:6 with xyerrorbars lt 1 title 'Naměřené hodnoty', f(x) lt 1 title 'Proložená závislost'

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

set print "fitpliki.txt"
print "   f(x) = Ax^2"
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