CreateGraph for predicting and plotting data