Animating selected plot elements

Hi:

I am trying to use this code http://tinyurl.com/44zcpfk (Scipy
cookbook) to make an animation where the background is fix and only a
line is updated. However, after executing the code, I only get a
window with an empty plot. Some debugging shows that the update_line
function is not being called.

I changed the use of numerix by numpy with respect to the original
code. Other than that is the same.

Any advice on how to fix the problem? Or may be this way is obsolete,
but all the animation examples I've found so far don't consider a
fixed background.

Alejandro.

Adding

import matplotlib
matplotlib.use('GTKAgg')

solved the problem.

But now I get this warning:

/usr/lib/pymodules/python2.6/matplotlib/backends/backend_gtk.py:621:
DeprecationWarning: Use the new widget gtk.Tooltip
  self.tooltips = gtk.Tooltips()

I am running Ubuntu 10.04, with MPL version 0.99.1.2-3ubuntu1, in case
that matter.

Alejandro.

ยทยทยท

On Mon, Apr 4, 2011 at 4:46 PM, Alejandro Weinstein <alejandro.weinstein@...287...> wrote:

Any advice on how to fix the problem? Or may be this way is obsolete,
but all the animation examples I've found so far don't consider a
fixed background.