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-003.svg"; beginfig(1); fill unitsquare xscaled 320 yscaled 220 withcolor white; % BEGIN DRAWING string line; pair p; path curve; boolean started; started:=false; forever: line:=readfrom "data/points.dat"; exitif line=EOF; if line<>"": p:=scantokens line; p:=(45+30*xpart p,40+26*ypart p); if started: curve:=curve--p; else: curve:=p; fi started:=true; fi endfor; draw (45,196)--(45,40)--(285,40) withcolor Grey; draw curve withpen pencircle scaled 1.5 withcolor Blue; label.bot("Time (s)",(165,30)); label.lft("0",(40,40)); label.lft("6",(40,196)); for x=0 upto 8: label.bot(decimal x,(45+30x,40)); endfor; label.top("Response (a.u.)",(165,181)); % END DRAWING label.lft("MPT-13-003" infont "cmr8",(312,210)); setbounds currentpicture to unitsquare xscaled 320 yscaled 220; endfig; end.