Calculate and graph riemann sums