set terminal postscript eps color enhanced font "Helvetica,16pt" size 8.6cm,11cm set output "g2_vs_alpha.eps" set multiplot f(x) = 1+2*x*(1-x) f_corr(x) = 1+ 2*x*(1-x)*0.886 raw_data_1="normal_alpha-0p000.dat" raw_data_2="normal_alpha-0p146.dat" raw_data_3="normal_alpha-0p500.dat" fitted_data_2="normal_alpha-0p146_fitted.dat" fitted_data_3="normal_alpha-0p500_fitted.dat" symbols_color_1 = "#d55e00" symbols_color_2 = "#cc79a7" symbols_color_3 = "#009e73" #common plot parameters? lw_number = 2 bin_size = 2 time_offset = 68 #top plot parameters set size 1,0.5 set origin 0,0.5 set xrange[-300:300] set yrange[0.95:1.5] set label 2 "{/Symbol h}=1" at -85,1.35 set label 3 "{/Symbol h}=0.117" at -50,1.22 set label 4 "{/Symbol h}=0" at -20,1.07 set ylabel "g^{(2)}({/Symbol t})" set xlabel "Two-photoevent timing separation {/Symbol t} (ns)" set ytics format "%.1f" set ytics 0.1 set label 1 "(a)" at graph 0.05, graph 0.90 plot raw_data_1 using ($1-time_offset)*bin_size:($3-0):(sqrt($2)/$2*$3) with yerrorbars linestyle 1 lw lw_number pointsize 1 linetype rgb symbols_color_1 notitle,\ raw_data_2 using ($1-time_offset)*bin_size:($3-0):(sqrt($2)/$2*$3) with yerrorbars linestyle 1 lw lw_number pointsize 1 linetype rgb symbols_color_2 notitle,\ raw_data_3 using ($1-time_offset)*bin_size:($3):(sqrt($2)/$2*$3) with yerrorbars linestyle 1 lw lw_number pointsize 1 linetype rgb symbols_color_3 notitle,\ fitted_data_2 using ($1)*bin_size/2:($3-0) with lines lw lw_number linetype rgb "#000000" notitle,\ fitted_data_3 using ($1)*bin_size/2:($3) with lines lw lw_number linetype rgb "#000000" notitle unset ytics unset label 1 #bottom plot parameters set size 1,0.50 set origin 0,0 set ytics format "%.1f" set ytics 0.1 set mxtics 2 set mytics 2 set xrange[0:0.51] set yrange[0.0:0.51] set label 1 "(b)" at graph 0.05, graph 0.90 set ylabel "g^{(2)}({/Symbol t}=0) - 1" set xlabel "Light power ratio {/Symbol h}" visibility = 0.9 plot "g2_vs_alpha.txt" u 1:($2):3 with yerrorbars linestyle 1 lw 2 ps 2 linetype rgb "#FF0000" notitle,\ f(x)-1 w l lw 2 lc rgb "black" notitle,\ visibility*visibility*(f(x)-1) w l lw 2.5 lc rgb "blue" dt 4 notitle #,\f_corr(x)-1 w l lw 2 dashtype 3 lc rgb "blue" notitle unset multiplot reset