title: What causes the FuncAnimation func to be called?
body: <p>I have an object <code>A</code> that instantiates an object <code>B</code>, and an object <code>B</code> in its constructor does</p>
  
  <pre><code>self.ani = animation.FuncAnimation(
              self.figure, func=self.gen_data, fargs=[self.data_dict],
              blit=True, repeat=False)
  </code></pre>
  
  <p>However, the <code>self.gen_method</code> never gets called. What do I do to ensure that this is not the case?</p>
  
  <p>What I ended up doing was putting the above code in a callback that gets triggered in object <code>A</code>, which then calls a <code>refresh()</code> method on object <code>B</code>, but I do not want to keep reconstructing the animation. There should be a way to construct it only once, but how?</p>
  
  <p>So what is the solution, how do I make sure that the <code>func</code> gets called regularly?</p>