title: dynamical plotting in Spyder freezing
body: <p>I am trying to make a framework that is dynamically replotting the data using matplotlib.
  However, every time I run the code, instead of updating the plot the plotting window stop responding until the code is done and then plot the final figure.</p>
  
  <p>Is in a "feature" of Spyder, or I wrote something wrong? Is there any workaround so it will actually work?</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import time as t
  
  def read_data():
      #retrieve the data, whatever
  
  def update_plot(ax):
      time, hw = read_data()
      ax.clear()
      ax.plot(time, hw)
  
  fig_hw = plt.figure()
  ax_hw = fig_hw.add_subplot(111)
  
  plt.ion()
  
  for i in range(100):    
      update_plot(ax_hw)
      plt.draw()
      t.sleep(0.1)
  </code></pre>