scale data to interval on which are legendre polynomials defined