read\format\errskip Cavendish_2.dat (*) t,x t=(t*10)/60 ! 1 frame every 10s, --> min x=x/1000 ! mm -> m x=-1.37+(x-1.06) ! left edge of board = 1.06m on our scale ! zero of scale is 1.37m to the right of left edge D0=10.31 ! mirror-to-screen distance th=atand(x/D0) ! theta clear defaults label\x `t, min' label\y `, ' set pchar -5 set yleadz 1 set font triumf.2 !scales 0 240 6 0 .85 4 !set yvmax 0.8 set nsxinc 5 set nsyinc 2 graph t,th scalar\vary a,P,th0,tau,drift,t0 th0=-10.7 a=2 P=10 tau=15 drift=0 t0=60 fit\weight\e2 (t>t0)*(t<220) th=a*exp(-(t-t0)/tau)*cos(2*Pi/P*(t-t0))+th0+drift*(t-t0) tt=[t0:220] set pchar 0 set colour 7 graph\noaxes tt a*exp(-(tt-t0)/tau)*cos(2*Pi/P*(tt-t0))+th0+drift*(tt-t0) set cursor -1 set %xloc 40 set %yloc 20 text `T='//rchar(60*P,`F5.1')//`'//rchar(60*FIT$E2[2],`F3.1')//` s' th0=-9 a=-2 P=10 tau=15 drift=0 te=t0 t0=5 fit\weight\e2 (t>t0)*(t'//rchar(60*FIT$E2[2],`F3.1')//` s' th0=-8.5 a=2 t0=255 fit\weight\e2 (t>t0) th=a*exp(-(t-t0)/tau)*cos(2*Pi/P*(t-t0))+th0+drift*(t-t0) tt=[t0:t[#]] set colour 6 graph\noaxes tt a*exp(-(tt-t0)/tau)*cos(2*Pi/P*(tt-t0))+th0+drift*(tt-t0) set cursor -1 set %xloc 70 set %yloc 85 text `T='//rchar(60*P,`F5.1')//`'//rchar(60*FIT$E2[2],`F3.1')//` s'