title: How to superimpose a plot step by step by iteration in Python?
body: <p>I have dataframes which I am trying to plot them in one single plot.</p>
  
  <p>However, it needs to be step-by-step by iteration. Like the one single plot should be updated at each time loop runs. </p>
  
  <p>What I am trying now is</p>
  
  <pre><code>for i in range(0, len(df))
      plt.plot(df[i].values[:,0], df[i].values[:,1])
  plt.show()
  </code></pre>
  
  <p>It seems work but it generates a graph at each iteration. </p>
  
  <p>I want them all to be in one plot as it is being updated.</p>
  
  <p>Thanks for your help.</p>
  
  <p>Edit: Regarding the answers, you referred does not contain what I wanted.
  That one is just superimposing two datasets.</p>
  
  <p>What I wanted was that as a new graph is superimposed, the original figure created should be updated at the next iteration, not showing them all at once after the end of the loop.</p>