Calculate unit rate from a graph