Fixed up some of the curve drawing. Now the color of each line is based on the matrix data.