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-10-006.svg";
beginfig(1);
fill unitsquare xscaled 320 yscaled 220 withcolor white;
% BEGIN DRAWING
numeric v[];
v[1]:=2;
v[2]:=2.4;
v[3]:=3;
v[4]:=3.2;
v[5]:=3.4;
v[6]:=5.7;
v[7]:=6;
v[8]:=6.4;
v[9]:=7;
v[10]:=7.5;
numeric N,h; N:=10; h:=.45;
vardef density(expr x)=
 save s,z; numeric s,z; s:=0;
 for j=1 upto N:
  z:=(x-v[j])/h;
  if abs z<6: s:=s+mexp(-128*z*z); fi
 endfor
 s/(N*h*sqrt(2*3.141592654))
enddef;
path p; numeric value;
p:=(160,35);
for k=0 upto 90:
 value:=k/10; p:=p--(160+80density(value),35+18value);
endfor
for k=90 downto 0:
 value:=k/10; p:=p--(160-80density(value),35+18value);
endfor
p:=p--cycle; fill p withcolor Wash; draw p withcolor Blue;
for i=1 upto N: fill fullcircle scaled 4 shifted (160+4*((i mod 3)-1),35+18v[i]) withcolor Orange; endfor
for value=0 step 2 until 8: label.lft(decimal value,(85,35+18value)); endfor
label(btex KDE bandwidth 0.45 etex,(160,18));
% END DRAWING
label.lft("MPT-10-006" infont "cmr8",(312,210));
setbounds currentpicture to unitsquare xscaled 320 yscaled 220;
endfig;
end.
