title: FuncAnimation() doesn't print tracking in Jupyter notebook
body: <p>I'm going through gradient descent algorithms and I want to track how they work using some interactive tools. So I've created the code below and it works excellent.
  The problem is that when I try to <code>print</code> something from <code>animate</code> method I don't see the output neither <code>Notebook</code> nor <code>Jupyter</code> command line.
  I found this <a href="https://stackoverflow.com/questions/61372567/funcanimation-doesnt-respond-when-after-dynamically-sending-data-to-plot-to-mov">post</a>. It looks like author is able to see print's output. It means it is possible to <code>print</code> it.
  What is wrong with my code? How can I see print results from the <code>animate</code> method here? BTW the <code>print</code> at the bottom works fine.</p>
  <pre><code>from numpy import random
  import matplotlib.pyplot as plt
  import numpy as np
  import time
  import matplotlib
  import matplotlib.animation as animation
  import time
  %matplotlib notebook
  
  X = random.normal(size=100, scale=2)
  Y = 4*X + 7
  
  # Building the model
  m = 0
  c = 0
  
  L = 0.02  # The learning Rate
  epochs = 1000  # The number of iterations to perform gradient descent
  
  n = float(len(X)) # Number of elements in X
  
  fig, ax = plt.subplots()
  ax.set_xlim(min(X)-2, max(X)+2)
  ax.set_ylim(min(Y)-5, max(Y)+5)
  ax.scatter(X, Y)
  line, = ax.plot(X, np.zeros(len(X)), 'r-')
  
  def animate(epoch):
      print(&quot;Hello world&quot;)
      global epochs
      if(epoch &gt;= epochs):
          return None
      global m
      global c
      global X
      global Y
      global L
      Y_pred = m*X + c
      line.set_ydata(Y_pred)
      D_m = (-2/n) * sum(X * (Y - Y_pred))
      D_c = (-2/n) * sum(Y - Y_pred)
      m = m - L * D_m
      c = c - L * D_c
      return line
  
  ani = animation.FuncAnimation(fig=fig, func=animate, interval=100, blit=True, save_count=50)
  
  plt.show()
     
  print (m, c)
  </code></pre>