title: Matplotlib animation saves only one part of the video with ffmpeg
body: <p>I have a weird problem with Python Matplotlib animation. I want to produce a video which includes another small video in the corner: the bigger plot should animate some data, and the small inserted plot should indicate with a moving dashed line the time position on the global data plot. It all works fine when I use only plot.show(), just the way I want it. But when I comment plot.show() and try to save it with ani.save, all it saves is a big plot, and the inserted one just disappears!</p>
  
  <p>If I try to uncomment both ani.save and plot.show() at the same time, I get an error message "AttributeError: draw_artist can only be used after an initial draw which caches the render", and the animation screen just stays blank.</p>
  
  <p>Could you please help me how to solve it? I need a saved file with the full movie.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import sys
  import numpy as np
  import matplotlib.pyplot as plt
  import matplotlib.animation as animation
  
  Q_data = np.arange(100.).reshape((10,10))
  age = np.arange(10.)
  Q_total = np.arange(10.)
  
  Q = Q_data[1:,:] 
  r_ax = np.arange(10.)
  
  
  fig, ax = plt.subplots()
  line, = ax.semilogy(r_ax,Q[0,:])
  time_template = 'time = %.1f'
  time_text = ax.text(0.58, 0.9, '', size=20, transform=ax.transAxes)
  plt.title('Plot 1')
  ax.set_xlabel('Axis Title')
  ax.set_ylabel('Axis Title')
  # this is another inset axes over the main axes    
  a = plt.axes([0.2, 0.5, .3, .3])
  line2, = plt.semilogx(age,Q_total,color='r',linewidth=1)    
  plt.title('Plot 2', y=1.11)
  a.set_xlabel('Small axis title')
  #fig.canvas.draw()
  
  def animate(i):
      line.set_ydata(Q[i,:])  # update the data
      time_text.set_text(time_template % (age[i])) 
      a.lines.pop()
      a.semilogx(age,Q_total,color='r',linewidth=1)  
      a.axvline(age[i], color='k', linestyle='--', linewidth=1)        
  
  
      return line, a, time_text
  
  # Init only required for blitting to give a clean slate.
  def init():
      line.set_ydata(np.ma.array(r_ax, mask=True))
      time_text.set_text('')
      return line, time_text    
  
  
  ani = animation.FuncAnimation(fig, animate, np.arange(1, Q.shape[0], 1),     init_func=init, interval=25, blit=True)
  
  ani.save('testanimation.avi', writer="ffmpeg", fps=15)                                 
  
  plt.show()
  </code></pre>