Code to generate abscissae and calculate data.