You aren't scaling the graph. Print out the X values, and you'll see the problem.