title: Animation is not happening in python
body: <p>I m trying to make an animation plot in python using matplotlib.animation and the package is present. But when I execute the program it is not showing any error but also no animation is there.</p>
  
  <pre><code>%matplotlib notebook
  import matplotlib.pyplot as plt
  import matplotlib.animation as animation
  import numpy as np
  
  n=100
  x= np.random.randn(n)
  def update(curr):
  if curr == n:
      a.event_source.stop()
      plt.cla()
      bins = np.arrange(-4,4,0.5)
      plt.hist(x[:curr],bins=bins)
      plt.axis([-4,4,0,30])
      plt.gca().set_title('Sampling the normal distribution')
      plt.gca().set_xlabel('Value')
      plt.gca().set_ylabel('Frequency')
      plt.annotate('n={}'.format(curr),[3,27])
  
  
      fig = plt.figure() 
      a = animation.FuncAnimation(fig,update,interval =100)
  </code></pre>
  
  <p>Looking forward to a solution.</p>
  
  <p>Thank you.</p>