set terminal postscript eps color enhanced font "Helvetica,16pt" size 8.6cm,12cm set output "g2_combined.eps" set multiplot # for fit function # N(x)=a+b*(1+(exp(-abs(x/tc)))**2) N(x)=a+b*exp(-abs(2*x/tc)) # common settings set xrange [-2:2] set format y "%4g" set format x "%2.1f" # set tics scale 2 set tics nomirror set format y2 "%2.1f" set samples 1000 # bottom figure set origin 0,0 set size 1,0.44 a=680 b=300 tc=0.3 fit N(x) 'g2_sun_noon.dat' using 1:2:3 via a,b,tc set y2r [600/a:1000/a] set y2tics 0.1 set label 1 "Sun" at -1.8,950 set xlabel "Timing separation {/Symbol t} [ns]" set yrange [600:1000] plot 'g2_sun_noon.dat' using 1:2:3 w yerrorbars notitle,\ N(x) w l ls -1 notitle # tc = 0.32 +/- 0.04 ns # g2 peak = 1.37 +/- 0.01 # reduced chisq = 0.985476 set format x "" unset xlabel # top figure: Hg trace set origin 0,0.7 set size 1,0.32 set yrange [3000:6300] set ytics 3500,1000 set label 1 "Hg discharge" at -1.8,5700 fit N(x) 'g2_hg.dat' using 1:2:3 via a,b,tc set y2r [3000/a:6300/a] set y2tics 0.1 plot 'g2_hg.dat' using 1:2:3 w yerrorbars notitle, \ N(x) w l ls -1 notitle # middle figure set origin 0,0.4 set size 1,0.34 set yrange [1050:1850] set ytics 200 a=500 ; b=500 ; tc=0.3 set label 1 "Ar arc" at -1.8,1750 fit N(x) 'g2_ar.dat' using 1:2:3 via a,b,tc set y2r [1050/a:1850/a] set y2tics 0.1 set label "Number of Coincidence Events" at -2.65,800 rotate by 90 set label "g^{(2)}({/Symbol t})" at 2.7,1600 rotate by -90 plot 'g2_ar.dat' using 1:2:3 w yerrorbars notitle, \ N(x) w l ls -1 notitle