#!/usr/bin/gnuplot infile1 = 'res_freq_over_trap_depth' infile2 = 'sim_res_freq.dat' set terminal postscript eps color enhanced solid font "Helvetica,22" size 8.6cm,8cm #set term pdf #set term pngcairo set output "lightshift.eps a = -1 # expected shift 3*0.7MHz/Gauss b = -20 line(x) = a*x -20.066 fit line(x) infile1 u 1:2:3 via a set xlabel "Voltage to dipole power stab (V)" set ylabel 'res freq (MHz)' set key right bottom set pointsize 1.0 #set ytics 1 #set xtics 3 set xrange [0:3.5] set label 4 sprintf("slope = %.3g MHz/V\n", a) at graph 0.02,0.1 #set label 5 sprintf("clock freq = %.6g kHz\n", b) at graph 0.02,0.04 plot infile1 u 1:($2):($3) w yerr ps 1 pt 7 lw 2 not, line(x) lc 3 lw 2 t '', infile2 u ($1*1.47):2 w l lw 2 lc 4 not unset output pause -1