Added ability to specify range of linear fit.