title: How should I go about animating particles in python matplotlib?
body: <p>For my homework, I am instructed to write a script that simulates the gas particles within a container.</p>
  
  <p>Now I have done the math part and so far it works as this:</p>
  
  <p>1) input a initial-list that contains the position coordinates and movement vector
  2) a converted list is then created, consisting of all the x coordinates and y coordinates, each in a separate sublist, for later plotting
  3) then run a series of functions I wrote that updates position and vector within the list after the interval
  4) convert the list again
  5) and so on</p>
  
  <p>However I simply can't find out how to animate these?</p>
  
  <p>I guess I need something like:</p>
  
  <p>1) plot a circle to use as container + the initial particles/positions
  2) keep the circle and update the list
  3) plot circle and updated list
  4) and so on, in very fast speed</p>