title: Updating arrow position in matplotlib
body: <p>I would like to update the arrow position while in a loop of plots. I found this <a href="https://stackoverflow.com/questions/39719652/move-patch-rather-than-remove-it?noredirect=1&amp;lq=1">post</a> that has an analogous question for the situation in which the patch is a rectangle. Below, the solution proposed in the mentioned post with the addition of the Arrow patch.</p>
  
  <pre><code>from matplotlib import pyplot as plt
  from matplotlib.patches import Rectangle, Arrow
  import numpy as np
  
  nmax = 10
  xdata = range(nmax)
  ydata = np.random.random(nmax)
  
  
  fig, ax = plt.subplots()
  ax.plot(xdata, ydata, 'o-')
  ax.xaxis.set_ticks(xdata)
  plt.ion()
  
  rect = plt.Rectangle((0, 0), nmax, 1, zorder=10)
  ax.add_patch(rect)
  
  arrow = Arrow(0,0,1,1)
  ax.add_patch(arrow)
  
  for i in range(nmax):
      rect.set_x(i)
      rect.set_width(nmax - i)
  
      #arrow.what --&gt; which method?
  
      fig.canvas.draw()
      plt.pause(0.1)
  </code></pre>
  
  <p>The problem with the Arrow patch is that apparently it does not have a set method related with its position as the Rectangle patch has. Any tip is welcome.</p>