set terminal postscript color enhanced "Helvetica" 18 set output "WavelengthVsTEmperature_Lpump.eps" f(t)=a*t+b g(t)=c*t+d a=0.3 b=808 c=-0.3 d=815 unset title set title "Wavelength tuning (pump form Left)" set ylabel "Center Wavelength (nm)" set xlabel "Temperature ({\312}C)" #degree symbol in windows terminal is \260 and in the postscript terminal it is {\312} set border 3 set xtics nomirror set ytics nomirror set yrange [807:814] fit f(x) 'LeftCollec_LeftPump_WavelengthVsTemp_20140102.dat' u 1:2 via a,b fit g(x) 'RightCollec_LeftPump_WavelengthVsTemp_20140102.dat' u 1:2 via c,d xint=(d-b)/(a-c) print "Degenerate Temperature =" print xint yint= a*xint + b print "Degenerate Wavelength =" print yint set arrow from xint,807 to xint,yint nohead unset label 1 set label 1 sprintf("%2.3f",xint) at xint+0.2,808 set arrow from 24,yint to xint,yint nohead unset label 2 set label 2 sprintf("%3.2f",yint) at xint-5,yint+0.2 plot 'LeftCollec_LeftPump_WavelengthVsTemp_20140102.dat' u 1:2 title "Left collec (H pol)" w p lw 2, f(x) lt 1 lw 3 title "Left fit", 'RightCollec_LeftPump_WavelengthVsTemp_20140102.dat' u 1:2 w p lw 2 lt 3 title "Right collec (V pol)", g(x) lt 3 lw 3 title "Right fit" unset label 1 unset label 2 unset arrow set terminal windows plot 'LeftCollec_LeftPump_WavelengthVsTemp_20140102.dat' u 1:2 title "Left collec" w p lw 2, f(x) lt 1 lw 3 title "Left fit", 'RightCollec_LeftPump_WavelengthVsTemp_20140102.dat' u 1:2 w p lw 2 lt 3 title "Right collec", g(x) lt 3 lw 3 title "Right fit"