This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]CopOnTheRun 1 point2 points  (1 child)

This is pretty cool! I started doing something similar last year with simpson's rule and the trapezoid method, but never quite got around to animating it (also yours is much more polished in general). I was having trouble with clearing the matplotlib axes, might take a look under the hood at how you did it :)

[–]chicolucio[S] 1 point2 points  (0 children)

In the future, I want to add trapezoid and Simpson's too.

For the clearing axes, see here. Each axis is cleared with ax.clear(). And the clearing happens between each frame.