I have no idea what's up with those docs, but it looks like there's an error their scale
argument. It's supposed to be a list of two elements, but they're only providing a single number. Try something like this:
doc.lines([[2,2], [-2,2], [1,1,2,2,3,3], [2,1]], 0, 0, [10,10]);