|
From: <lyn...@fr...> - 2007-08-26 21:38:21
|
Hello! I found quite a lot of info on fitting exponential functions but could not get a good result with my FIT_LIMIT and FIT_MAXITER. I wonder if it is possible to fit just a line in a single log plot? Or how can I use the other fitting parameters to get a fit that looks right in single log plotting style of the data below. It hasn't got many values but I can't get more. Two other not so important questions: Would there be a way to loop this over the other data columns as well? Is there a better way to get the axis labels close to the last tic posistion to save space? Any help or hints welcome Lynx ____________________________________________________________________ #set terminal png font FreeSans 14 crop size 600,400 #set xlabel "Spz" #set lmargin 20 set xrange [1:12] set xtics 1,1,11 set label 1 'Spz' at graph 0.97, graph -.05 set yrange [1e-12:9e-8] set mytics 10 #set ytics 0,1e-,1.1e-5 set label 2 'I[A]' at graph -0.05, graph 0.99 #set ylabel "P[mbar]" offset screen 0.3,0.8 rotate by 0 #set ylabel "P[mbar]" offset 4,0 rotate by 0 set key right top Left reverse set logscale y set termoption enhanced #f(x) = a*b**(x) f(x) = a * exp (-x*b) FIT_LIMIT = 1e-99 FIT_MAXITER = 0 fit [1:11] f(x) '< sed "s/ 0/ ?0/g" dosis.dat' using 1:3 via a,b #plot a*b**(x) plot '< sed "s/ 0/ ?0/g" dosis.dat' using 1:3 t "C_2: 1" ls 1 with lp, a * exp (-x*b) #, '< sed "s/ 0/ ?0/g" dosis.dat' using 1:4 t "C_2: 2" ls 2 with lp, '< sed "s/ 0/ ?0/g" dosis.dat' using 1:5 t "C_2: 3" ls 3 with lp, '< sed "s/ 0/ ?0/g" dosis.dat' using 1:6 t "C_2: 4" ls 4 with lp _____________________________________________________________________ dosis.dat #Spz diameter/nm I1/A I2/a I3/A I4/A 1 400 2.6e-8 6.6e-9 1.8e-9 1.8e-10 2 350 1.8e-8 4.5e-9 1.2e-9 1.3e-10 3 300 1.3e-8 3.3e-9 8.5e-10 9.1e-11 4 210 6.1e-9 1.7e-9 4.3e-10 4.9e-11 5 140 2.6e-9 6.8e-10 1.8e-10 0 6 95 1.4e-9 4e-10 1e-10 0 7 52 6.3e-10 1.8e-10 5.2e-11 0 8 34 2.4e-10 7e-11 0 0 9 18 9.1e-11 3.3e-11 0 0 10 12 5.2e-11 0 0 0 11 9 3.8e-11 0 0 0 |