#!/usr/bin/gnuplot set terminal postscript eps color enhanced solid font 'Helvetica, 16pt' size 8.6cm, 6cm dl .5 point_sz = 0.7 data_f = 'offset_rtt_2_4_15.dat' fit_file = 'residual_offset_parabolic-fit_line.dat' residual_file = 'residual_offset_parabolic.dat' thres_mins = 55 # do not plot data for elapsed time more than this (mins) # extract parameters to center the ranges stats residual_file u (firsttime=$1) every ::0::0 stats residual_file u (firstoffset=$2) every ::0::0 set output 'offsets_separate_atomic_clocks.eps' set multiplot set lmargin at screen 0.13 set label 1 '(a)' at screen 0.87, 0.92 set label 2 '(b)' at screen 0.87, 0.64 set label 3 '(c)' at screen 0.87, 0.35 ###### clock offset ############ set tmargin at screen 0.96 set bmargin at screen 0.70 set ytics 50 set yrange [-30:120] # labels set ylabel '{/Symbol d} - ~{/Symbol d&{.}}{.6/Symbol \55 } (ns)' offset 1.1, 0 set ylabel '{/Symbol d} - {/Symbol d}_0 (ns)' offset 1.1, 0 # set ylabel '{/Symbol d} (ns)' offset 1.1, 0 ####### offsets and parabolic fit ########## set xrange [-1:56] set xtics auto set xtics format ' ' set ytics format '% 4g' plot fit_file \ u (($1-firsttime)*1e-9/60):(($2-firstoffset)) w l lw 2 lc rgb "blue" notitle, \ residual_file u (($1-firsttime)*1e-9/60):(($1-firsttime)*1e-9/60 < thres_mins ? ($2-firstoffset):1/0) every 5 w p pt 6 ps point_sz lc rgb "black" notitle ####### residuals ########## set tmargin at screen 0.68 set bmargin at screen 0.42 set ylabel 'Residual (ns)' offset 1.1, 0 set ytics .500 set yrange [-.600:.600] plot residual_file u (($1-firsttime)*1e-9/60):(($1-firsttime)*1e-9/60 < thres_mins ? $4*1e0 : 1/0) w p pt 6 ps point_sz lc rgb "#006600" notitle ######## round trip time ########## set tmargin at screen 0.40 set bmargin at screen 0.14 set xlabel "Elapsed Time (mins)" offset 0, 0.4 set ylabel '{/Symbol D}T (ns)' offset 1.1, 0 set ytics 250 set yrange [0:580] set xtics format '%g' plot data_f u (($1-firsttime)*1e-9/60):(($1-firsttime)*1e-9/60 < thres_mins ? $3 : 1/0) every 5 w p pt 6 ps point_sz lc rgb "red" notitle