prologues := 3;
outputformat := "svg";
defaultfont := "cmr10";
defaultscale := 1.1;
color Blue,Teal,Orange,Green,Grey,Light,Wash;
Blue := (0,84/255,159/255); Teal := (0,177/255,183/255);
Orange := (246/255,168/255,0); Green := (87/255,171/255,39/255);
Grey := (100/255,101/255,103/255); Light := (236/255,236/255,237/255);
Wash := (232/255,241/255,250/255);
% Format displayed numbers to hundredths using integer strings.
vardef numlabel(expr value)=
 save n,whole,frac; numeric n,whole,frac;
 n:=round(100abs value); whole:=floor(n/100); frac:=n mod 100;
 (if value<-.005: "-" & fi decimal whole
  if frac>0: & "." & if frac<10: "0" & fi decimal frac fi)
enddef;
pickup pencircle scaled .9;
outputtemplate := "MPT-13-004.svg";
beginfig(1);
fill unitsquare xscaled 320 yscaled 220 withcolor white;
% BEGIN DRAWING
input graph;
numeric x,y; pair p,previous; boolean connected;
connected:=false;
draw (45,196)--(45,40)--(285,40) withcolor Grey;
gdata("data/readings.dat", row,
 if scantokens row6=1:
  x:=scantokens row1; y:=scantokens row2;
  p:=(45+30x,40+26y);
  if connected: draw previous--p withcolor Blue; fi
  fill fullcircle scaled 4 shifted p withcolor Blue;
  previous:=p; connected:=true;
 else: connected:=false; fi
);
label.bot("Time (s)",(165,30));
label.top("Response (a.u.); missing at t = 3",(165,181));
for x=0 upto 8: label.bot(decimal x,(45+30x,40)); endfor;
for y=0 step 2 until 6: label.lft(decimal y,(42,40+26y)); endfor;
% END DRAWING
label.lft("MPT-13-004" infont "cmr8",(312,210));
setbounds currentpicture to unitsquare xscaled 320 yscaled 220;
endfig;
end.
