Python matplotlib animation help

No.11852005 ViewReplyOriginalReport
I am decently new to programming, I just took CS1301 by Georgia Tech at edx.com .
Before learning serious code, I watched 3Blue1Brown's video on how to approximate hard-to-solve differential equations with coding.
https://www.youtube.com/watch?v=p_di4Zn4wz4
I successfully replicated his pendulum code with my own understanding and without following his video step by step.
I also successfully created code that predicts how two planets move about in a 2d plane with gravity. I created some vector classes and functions in order to accomplish this.
My problem is I have very little understanding of the matplotlib library, which is sacrificing my ability to showcase the gravity code to its full potential. This will be even more of a serious issue if I expand my code for the 3d instance(I know it's chaotic, but I find it interesting).
Right now, all I can do is plot each of planet's trajectories, with no time information.
Here is a good summary:
from matplotlib import pyplot as plt
plt.plot([list of planet1's x-values], [list of planet1's y-values])
plt.plot([list of planet2's x-values], [list of planet2's y-values])
plt.show
When I look up tutorials on how to add in time as an animation, the tutorials talk about "figs","axes", and "lines", and I have a hard time understanding what properties they have in code and how they are structurally related to each other in Python.
Thanks for any help.