set terminal postscript eps color enhanced font "Helvetica,20pt" size 12cm,9cm # common settings set format y "%4g" set format x "%2.0f" set tics scale 2 set tics nomirror set format y2 "%2.1f" set y2r [0:2] set y2tics 0.5 set ytics 500 set xtics 25 set xlabel "Photoevent Separation {/Symbol t} [ns]" set ylabel "Two-Photon Coincidences" set y2label "g^{(2)}({/Symbol t})" rotate by -90 # for fit function N(x)=a+b*(exp(-abs((x)/tc))) a=500 b=500 tc=25 set fit errorvariables set xrange [0:100] FIT_LIMIT=1.e-15 FIT_MAXITER=1000 fit N(x) 'g2_arclaser.txt' using 1:2:(sqrt($2)) via a,b,tc set output "g2_arclaser.eps" set xrange [-2:96] set yrange [0:2*a] set samples 1000 set label 1 "wideband (blackbody) response" at 13,1450 tc rgb 'blue' set arrow 1 from 12,1450 to 2,1450 filled lc rgb 'blue' front set label 2 "narrowband (laser) response" at 35,1250 tc rgb 'blue' set arrow 3 from 33,1240 to 21,1165 filled lc rgb 'blue' front plot 'g2_arclaser.txt' using 1:2:(sqrt($2)) w yerrorbars lc 1 ps 1 notitle,\ N(x) w l ls -1 lw 2 notitle