I can do it in one line.

Spoiler Alert, click show to read: 
Just remove one of the dimensions, so that it's now 1d, then draw line through 'squished' dots!