title: Plotting line with marker as head
body: <p>I have the following code that produces an animation of drawing a circle.</p>
  
  <pre><code>from math import cos, sin
  import matplotlib.pyplot as plt
  import matplotlib.animation as animation
  
  def update_plot(num, x, y, line):
      line.set_data(x[:num], y[:num])
      line.axes.axis([-1.5, 1.5, -1.5, 1.5])
      return line
  
  def plot_circle():
      x = []
      y = []
      for i in range(100):
          x.append(cos(i/10.0))
          y.append(sin(i/10.0))
  
      fig, ax = plt.subplots()
      line, = ax.plot(x, y, color = "k")
      ani = animation.FuncAnimation(fig, update_plot, len(x), fargs=[x, y, line], interval = 1, blit = False)
      plt.show()
  
  plot_circle()
  </code></pre>
  
  <p>The line is longer than a full lap, and so to be able to still see the drawing when the line overlaps, I would like a marker that shows what is being drawn. I tried to add a scatter plot  into the update call, like</p>
  
  <pre><code>scat = plt.scatter(0, 0)
  ani = animation.FuncAnimation(fig, update_plot, len(x), fargs=[x, y, line, scat], interval = 1, blit = False)
  </code></pre>
  
  <p>and try to update the position of the scatter-plot point using <code>x[num]</code> and <code>y[num]</code> in <code>update_plot</code> without success. How can I achieve this effect?</p>