Fixes bug in how lines were colored

I was calculating xydist between successive mini-line segments
incorrectly. This fixes that problem by creating a distance matrix then
subsetting it to just distances between the first point and each
successive point.