Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
% Produced by: (find-dn5 "tests/test2.tex")
outputtemplate := "test2/%3c.mps";
% «metapost-library»  (to ".metapost-library")
% (find-angg ".emacs.papers" "metapost")
% (find-angg "METAPOST/test1.mp")
% (find-angg "METAPOST/test1.tex")
def drawcircledot := addto currentpicture contour makepath pencircle enddef;
def drawpencircleat (expr s, p) := drawcircledot scaled s shifted p enddef;
def drawcdot expr p := drawpencircleat (3pt, p) enddef;
def drawbdot expr p := drawpencircleat (2pt, p) withcolor background enddef;
def drawodot expr p := drawcdot p; drawbdot p enddef;

def startpoint expr p := point 0 of p enddef;
def endpoint   expr p := point (length p) of p enddef;
def drawcc_ expr p := drawcdot (startpoint p); drawcdot (endpoint p) enddef;
def drawco_ expr p := drawcdot (startpoint p); drawodot (endpoint p) enddef;
def drawoc_ expr p := drawodot (startpoint p); drawcdot (endpoint p) enddef;
def drawoo_ expr p := drawodot (startpoint p); drawodot (endpoint p) enddef;
def drawcc expr p := draw p; drawcc_ p enddef;
def drawco expr p := draw p; drawco_ p enddef;
def drawoc expr p := draw p; drawoc_ p enddef;
def drawoo expr p := draw p; drawoo_ p enddef;

u := 0.5cm;

pen axispen;
pen tickpen;
axispen := pencircle scaled 1pt;
tickpen := pencircle scaled 1pt;
tickradius := 3pt;
def Xaxis(expr xl, xr) :=
  drawarrow (xl*u, 0)--(xr*u, 0) withpen axispen;
  for x = (ceiling xl) upto (floor xr):
    draw (x*u, -tickradius)--(x*u, tickradius) withpen tickpen;
def Yaxis(expr yd, yu) :=
  drawarrow (0, yd*u)--(0, yu*u) withpen axispen;
  for y = (ceiling yd) upto (floor yu):
    draw (-tickradius, y*u)--(tickradius, y*u) withpen tickpen;

def WIDTH expr w := pickup pencircle scaled w enddef;
% «metapost-diagram»  (to ".metapost-diagram")
u := 0.5cm;
  Xaxis(-2, 3);
  Yaxis(-3, 4);
  drawcdot (1u, 1u);
  drawodot (2u, 1u);
  drawodot (2u, 2u);
  drawoc (0u,2u)--(2u,3u);