#!/usr/bin/gnuplot infile1 = '1.5V_tmp' #set terminal postscript eps color enhanced solid font "Helvetica,26" size 16cm,10cm #set term pdf #set term pngcairo #set output "tmp.pdf" tx=0.8 gamma0 = .0100 x0 = 200.237 y0=0.95 lorentz(x) = y0 - tx / ( 4*( (x0-x) / (gamma0) )**2 + 1 ) fit [200.232:200.242] lorentz(x) infile1 u ($1/1000000):5:6 via y0,tx,x0,gamma0 set xlabel "DDS frequency (MHz)" set ylabel 'bright state (%)' set key right bottom set pointsize 1.0 #set label 2 sprintf("extinction = %.3g\n", tx*100) at graph 0.02,0.4 set label 4 sprintf("gamma = %.3g MHz\n", gamma0) at graph 0.02,0.3 set label 5 sprintf("res = %.3g MHz\n", x0) at graph 0.02,0.25 plot [200.232:200.242] infile1 u (($1)/1000000):($5*100):($6*100) w yerr ps 0.8 pt 7 lw 2 not , lorentz(x)*100 lc 3 lw 2 t 'lorentz' unset output pause -1