Finding the gradient and y- and x-intercept of a straight line