def drawpoints(points, xmin=None, ymin=None, xmax=None, ymax=None):
    skips = np.hstack((np.array([0]),points[:,2]))
    xys = np.vstack((np.zeros((1,2)),np.cumsum(points[:,:2],axis=0)))
    xys[:,:2] -= xys[:,:2].mean(axis=0)
#     xys = points[:,:2]

    xs=[]
    ys=[]
    x=[]
    y=[]
    for xy,s in zip(xys, skips):
        if s:
            if len(x) > 1:
                xs.append(x)
                ys.append(y)
            x=[]
            y=[]
        else:
            x.append(xy[0])
            y.append(xy[1])

    for x,y in zip(xs, ys):
        pl.plot(x, y, 'k-')

    if xmin is None:
        xmin,ymin = xys.min(axis=0)
        xmax,ymax = xys.max(axis=0)
    ax = pl.gca()
    ax.set_xlim(xmin, xmax)
    ax.set_ylim(ymin, ymax)
    ax.invert_yaxis()
    ax.set_xticks([])
    ax.set_yticks([])
dataset/ETHPy150Open udibr/sketch/sketch.py/drawpoints/original