def show_rects(self):
    rect_list = self.get_riemann_rectangles_list(self.v_graph, 7, max_dx=1.0, x_min=0, x_max=8)
    flat_graph = self.get_graph((lambda t: 0))
    rects = self.get_riemann_rectangles(flat_graph, x_min=0, x_max=8, dx=1.0)
    for new_rects in rect_list:
        new_rects.set_fill(opacity=0.8)
        rects.align_submobjects(new_rects)
        for alt_rect in rects[::2]:
            alt_rect.set_fill(opacity=0)
        self.play(Transform(rects, new_rects, run_time=2, lag_ratio=0.5))
    self.wait()
def show_rects(self):
    rect_list = self.get_riemann_rectangles_list(self.v_graph, 7, max_dx=1.0, x_min=0, x_max=8)
    flat_graph = self.get_graph((lambda t: 0))
    rects = self.get_riemann_rectangles(flat_graph, x_min=0, x_max=8, dx=1.0)
    for new_rects in rect_list:
        new_rects.set_fill(opacity=0.8)
        rects.align_submobjects(new_rects)
        for alt_rect in rects[::2]:
            alt_rect.set_fill(opacity=0)
        self.play(Transform(rects, new_rects, run_time=2, lag_ratio=0.5))
    self.wait()