#!/usr/bin/gnuplot # plots the tx curves, ratio of with and without atom, for both shapes @ 13.5ns set border linewidth 1.5 set encoding utf8 ## input file ## infile_long_dec='non_reversed_with_alternating_09_26_onwards_combined_histo_tx_2ns' infile_long_ris='reversed_with_alternating_09_26_onwards_combined_histo_tx_2ns' infile_long_dec_theory ='trans_ratio_long_dec_w_bg' infile_long_ris_theory ='trans_ratio_long_ris_w_bg' infile_long_dec_theory_wo_bg ='trans_ratio_long_dec_wo_bg' infile_long_ris_theory_wo_bg ='trans_ratio_long_ris_wo_bg' infile_decaying_pulse='decaying_exp_pulse_fewerpoints' infile_rising_pulse='rising_exp_pulse_fewerpoints' ################# unset label # remove any previous labels set terminal postscript eps color enhanced dashed dashlength 2 "Helvetica,22" size 12.6cm, 8cm set output "tx_ratio.eps" set border 3 set nobar set multiplot #layout 1,2 unset key set origin 0,0 set size 0.53,1 set tmargin 1.5 set lmargin 8 set bmargin 4 set rmargin 0 set xtics 15 nomirror set ytics 0.1 scale 2,1 format "%g" nomirror set xr [-15:65] set xlabel "Time from heralding event, {/Times-Italic t_i} (ns)" offset graph 0.65,0 # set ylabel "{/Times-Italic R_{f} / R_{f,0}}" set yr [0.8:1.1] set mytics 2 plot infile_long_dec_theory_wo_bg u ($1):2 w lines lt 1 lc rgb "web-blue" lw 2, infile_long_dec u (($2-881.5)):($5/$9):(sqrt( ($6/$9)**2 + ($5**2*$10**2/$9**4))) with yerrorbars pt 6 ps 0.8 lt 1 lc rgb "red", infile_long_dec_theory u ($1):2 w lines lt 3 lc rgb "dark-green" lw 3 ################################# set origin 0.47,0 set size 0.53,1 set border 3 set lmargin 5 set rmargin 3 unset xlabel unset ylabel set ytics format " " set xr [-65:1.05*15] plot infile_long_ris_theory_wo_bg u ($1):2 w lines lt 1 lc rgb "web-blue" lw 2, infile_long_ris u (($2-878.5)):($5/$9):(sqrt( ($6/$9)**2 + ($5**2*$10**2/$9**4))) with yerrorbars pt 6 ps 0.8 lt 1 lc rgb "red", infile_long_ris_theory u ($1):2 w lines lt 3 lc rgb "dark-green" lw 3 ################################# ####### INSETS ####### set origin 0.25,0.58 set size 0.25,0.4 unset ylabel unset xlabel set xr [-0.3:1.5] set yr [0:1] unset xtics #set xtics (0) offset -0.1,0.4 font "Helvetica,18" unset border unset ytics set label 1 "{/Symbol-Oblique x}" at -0.8,0.5 set label 2 "t" at 1.6,0 font "Times-Italic,22" set label 3 "0" at -0.15,-0.25 font "Helvetica,18" #set style arrow 1 head filled size screen 0.005,40,40 #set arrow 1 from -0.85,0.4 to -0.85,0.1 as 1 set style arrow 1 lw 1.2 head filled size screen 0.01,15 set arrow 1 from -0.3,0 to 1.5,0 as 1 set arrow 2 from -0.3,0 to -0.3,1.2 as 1 plot infile_decaying_pulse u ($1*1e7):($2*1e-4) w l lc rgb "blue" lw 2 set origin 0.65,0.58 set size 0.25,0.4 unset ylabel unset xlabel set xr [-1.3:0.3] set yr [0:1] unset xtics unset ytics #set xtics (0) offset -0.1,0.4 font "Helvetica,18" set border 2 lw 1 unset ytics set label 1 "{/Symbol-Oblique x}" at -1.8,0.5 set label 2 "t" at 0.65,0 font "Times-Italic,22" set style arrow 1 lw 1.2 head filled size screen 0.01,15 set label 3 "0" at -0.15,-0.25 font "Helvetica,18" set arrow 1 from -1.3,0 to 0.55,0 as 1 set arrow 2 from -1.3,0 to -1.3,1.2 as 1 plot infile_rising_pulse u ($1*1e7):($2*1e-4) w l lc rgb "blue" lw 2 unset multiplot # exit multiplot mode (prompt changes back to 'gnuplot') unset output pause -1