Removing numpy.linalg.lstsq, and fixing plot