title: Plotting and removing a vertical line inside a loop matplotlib/seaborn
body: <p>I have a pandas DataFrame <code>stock_open</code> that contains stock prices vs dates and looks like:
  <a href="https://i.stack.imgur.com/OqTIi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OqTIi.png" alt="Stock prices vs dates"></a></p>
  
  <p>I want to plot the time series line-plot of stock prices versus the date column and show the dates increasing by plotting a vertical line for each date. I want to achieve this by plotting the graphs for a few dates, saving those plots as separate images and then use ffmpeg to combine them into a video. So, I did this:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import seaborn as sns
  
  my_dates = ['2019-11-20', '2019-12-20', '2020-01-20', '2020-02-20', '2020-03-20']
  
  fig, [[ax1, ax2], [ax3, ax4]] = plt.subplots(nrows=2, ncols=2, figsize=(20, 8))
  
  sns.lineplot(x='Date', y='value', hue='variable',
               data=pd.melt(stock_open, ['Date']), ax=ax3)
  ax3.legend(loc='center left', bbox_to_anchor=(1, 0.5))
  
  plot_no = 0
  for i in range(len(my_dates)):
      my_selected_date = my_dates[i]
      ax3.axvline(my_selected_date)
      ax3.set_title(str(my_selected_date))
      fig.savefig('output_images/stock_image_{plot_no:04d}.png'.format(plot_no=plot_no))
      plot_no += 1
  </code></pre>
  
  <p>Everything is working fine except that the vertical line 'persists' in the figures in all the iterations. </p>
  
  <p>The first image is as expected:
  <a href="https://i.stack.imgur.com/F1ZH0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F1ZH0.png" alt="stock_plot_0000"></a></p>
  
  <p>But the images from the following iterations in the loop have the vertical line from the previous iteration:
  <a href="https://i.stack.imgur.com/s4Xle.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s4Xle.png" alt="stock_plot_0004"></a></p>
  
  <p>(images are cropped intentionally)</p>
  
  <p>I want to remove the vertical line from the previous iterations.</p>
  
  <p>I thought of using animations from matplotlib, but the other subfigures also need to be updated and saved in this process. </p>
  
  <p>Is there a way to do this without starting from the beginning?
  Initially I wanted to show a moving line-plot with the date, but couldn't achieve that either. So I used this strategy to show updates on the figure.</p>
  
  <p>TIA!</p>