How to pass arguments to animation.FuncAnimation()?
<p>How to pass arguments to <code>animation.FuncAnimation()</code>? I tried, but didn't work. The signature of <code>animation.FuncAnimation()</code> is </p>

<blockquote>
  <p>class matplotlib.animation.FuncAnimation(fig, func, frames=None, init_func=None, fargs=None, save_count=None, **kwargs)                 Bases: matplotlib.animation.TimedAnimation</p>
</blockquote>

<p>I have pasted my code below. Which changes I have to make?   </p>

<pre><code>import matplotlib.pyplot as plt
import matplotlib.animation as animation

def animate(i,argu):
    print argu

    graph_data = open('example.txt','r').read()
    lines = graph_data.split('\n')
    xs = []
    ys = []
    for line in lines:
        if len(line) &gt; 1:
            x, y = line.split(',')
            xs.append(x)
            ys.append(y)
        ax1.clear()
        ax1.plot(xs, ys)
        plt.grid()

ani = animation.FuncAnimation(fig,animate,fargs = 5,interval = 100)
plt.show()
</code></pre>