#!/usr/bin/gnuplot infile1 = 'res_over_B' set terminal postscript eps color enhanced solid font "Helvetica,22" size 8.6cm,8cm #set term pdf #set term pngcairo set output "bfield_calibration.eps" a = -1 # expected shift 3*0.7MHz/Gauss b = 200830 line(x) = 3*700/8*a*x + b fit line(x) infile1 u 1:2:3 via a,b set xlabel "Voltage to current driver (V)" set ylabel 'res freq (MHz)' set key right bottom set pointsize 1.0 set ytics 1 set xtics 3 set xrange [0:9.6] set label 4 sprintf("slope = %.3g Gauss/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/1000):($3/1000) w yerr ps 1 pt 7 lw 2 not, line(x)/1000 lc 3 lw 2 t '' unset output pause -1