set key right bottom

#set size .9,.85

set fit errorvariables
set xlabel "$\\frac{C}{\\mathrm{\\mu F}}$"
set ylabel "$\\frac{P}{\\mathrm{W}}$"

set decimalsign ','
set samples 5000

#set xtics 11
#set ytics 1

f(x) = A*x+B
fit f(x) 'vytezek.dat' using 1:2 via A,B
plot 'vytezek.dat' using 1:2:3 with yerrorbars lt 1 title 'Naměřené hodnoty', f(x) lt 1 title 'Proložená závislost'

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

#set print "fitvytezek.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