# set terminal png transparent nocrop enhanced font arial 8 size 420,320 # set output 'fit.8.png' set key right below Right noreverse noinvert enhanced box linetype -2 linewidth 1.000 samplen 4 spacing 1 width 0 height 0 autotitles set title "fit weighted towards low temperatures" 0.000000,0.000000 font "" set xlabel "Temperature T [deg Cels.]" 0.000000,0.000000 font "" set ylabel "Density [g/cm3]" 0.000000,0.000000 font "" l(x) = y0 + m*x y0 = 1.06986180180309 m = -0.000969050590764801 plot 'lcdemo.dat', l(x) ## fit l(x) 'lcdemo.dat' using 1:2:4 via y0, m