set term X11 enhanced f1(x) = a1*tanh(x/b1) # define the function to be fit a1 = 300; b1 = 0.005; # initial guess for a1 and b1 fit f1(x) 'force.dat' using 1:2 via a1, b1 f2(x) = a2 * tanh(x/b2) # define the function to be fit a2 = 300; b2 = 0.005; # initial guess for a and b fit f2(x) 'force.dat' using 1:3 via a2, b2 set key at 0.018,150 title "F(x) = A tanh (x/B)" # title to key! set title "Force Deflection Data \n and curve fit" # note newline! set pointsize 1.5 # larger point! set xlabel 'Deflection, {/Symbol D}_x (m)' # Greek symbols! set ylabel 'Force, {/Times-Italic F}_A, (kN)' # italics! plot "force.dat" using 1:2 title 'Column data' with points pt 3, \ "force.dat" using 1:3 title 'Beam data' with points pt 4, \ a1 * tanh( x / b1 ) title 'Column-fit: A=309, B=0.00227', \ a2 * tanh( x / b2 ) title 'Beam-fit: A=260, B=0.00415' #set output 'force.ps' #creates ps output #set term post land color #replot #unset output #close file #set term qt enhanced reset #back to default values