 <p>Try calling <code>plt.draw()</code> inside of your "updated" function like so:</p> <pre><code>def updated(val): z1 = sz1.val lines=lines_param(z1) #clear out the old lines and plot the new ones plt.cla() for y in lines: plt.plot(x_m, y, linewidth=.2) plt.draw() </code></pre> <p>I was unable to get your code running on my machine because I am not sure how the data your 'foo' directory is structured. If you could post the format of your data it would be easier to debug your issue.</p>