set terminal postscript eps color enhanced font "Helvetica,20pt" size 12cm,9cm set output "g2_arclaser_2.eps" set multiplot set origin 0,0 set size 1,1 # 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 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 set object 1 rectangle from -1,a to 1, 1.8*a set arrow 4 from 0,940 to 8,800 lc rgb 'black' filled 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 # small inset set origin .15,.11 set size .4,.4 unset label 1 unset label 2 unset arrow 1 unset arrow 3 unset object 1 unset arrow 4 set xrange [-1.5:1.5] set yrange [a:1.8*a] set y2r [1:1.8] set y2tics 0.2 unset xlabel unset ylabel unset y2label set xtics 1 set format y "" plot 'g2_arclaser.txt' using 1:($2):(sqrt($2)) \ w yerrorbars lc 1 ps 1 notitle