title: Animate objects with different FPS with Matplotlib and FuncAnimation
body: <p>I want to create an animation where I update two different objects, let's say <code>A</code> and <code>B</code>. The data that I collected to each object was retrieved by using different devices with different FPS (one of them at 15 FPS, the other at 30 FPS). The length of the data is 30 seconds, so if I want to create an animation with Matplotlib with such duration and both objects at the same time, I must animate <code>A</code> at 15 FPS and <code>B</code> at 30 FPS.</p>
  
  <p>So far I was able to create the animation of both objects at the same time, but I can only input one amount of FPS. If I input 15, <code>A</code> is ok, but <code>B</code> is too slow and then both are not synchronized.</p>
  
  <p>A summarize of what I tried:</p>
  
  <pre><code>(...)
  
      A, = plt.plot([], [], 'bo-', animated=True)
      B, = plt.plot([], [], 'co-', animated=True)
  
      def init():
          ax.set_xlim(0, 80)
          ax.set_ylim(-15, 15)
          return A, B,
  
      def update(frame):
          """Perform animation step"""
          # Some arrays with data are xdata and ydata. In this case 
          # they are moving lines
          A.set_data([0, xdata1[frame]], [0, ydata1[frame]])
          B.set_data([0, xdata2[frame]], [0, ydata2[frame]])
          return A, B,
  
      ani = FuncAnimation(fig, update, frames=range(len(xdata1)), init_func=init, blit=True)
      ani.save('video.mp4', fps=15, extra_args=['-vcodec', 'libx264'])
  
  (...)
  </code></pre>
  
  <p>Any idea if this can be done? Even if I need to lost some data from the object running at 30FPS, that would be fine as well. Thanks!</p>