#!/usr/bin/gnuplot set terminal postscript eps color enhanced solid font 'Helvetica, 16pt' size 8.6cm, 7cm dl .5 s = 30 point_sz = 0.7 data_f = 'offset.dat' fit_file = 'parabolic_fit.dat' # residual_file = 'residual_offset_parabolic.dat' thres_mins = 200 # do not plot data for elapsed time more than this (mins) # extract parameters to center the ranges stats data_f u (firsttime=$1) every ::0::0 stats data_f 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 set tmargin at screen 0.96 set bmargin at screen 0.70 set ytics 400 set yrange [-50:900] # 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 [-10:210] # set xtics auto set xtics format ' ' set ytics format '% 4g' plot fit_file \ u (($1-firsttime)/60):(($2-firstoffset)) w l lw 2 lc rgb "blue" notitle, \ data_f u (($1-firsttime)/60):(($1-firsttime)/60 < thres_mins ? ($2-firstoffset):1/0) every s 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 [-1.2:1.2] plot data_f u (($1-firsttime)/60):(($1-firsttime)/60 < thres_mins ? $3*1e0 : 1/0) every s 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 - {/Symbol D}T_0 (ns)' offset 1.1, 0 set ytics 50 set yrange [0:120] set xtics format '%g' rtt_origin = 103300 plot data_f u (($1-firsttime)/60):(($1-firsttime)/60 < thres_mins ? $4-rtt_origin : 1/0) every s w p pt 6 ps point_sz lc rgb "red" notitle