how to find degree of function from graph