find acceleration due to gravity from slope of graph