Drawing the graph of the gradient function