Thanks for taking time to read my question, first time I have posted on SO so here goes...
I am plotting time series data in an animation using matplotlib.animation.
def animate(i):
timetext.set_text(i)
x = numpy.array(range(1,npdata.shape[0]+1))
for lnum,line in enumerate(lines):
line.set_data(x,npdata[:,plotlays[lnum]-1,i])
return lines, timetext # <- returns a tuple of form (list, artist)
change this to
return tuple(lines) + (timetext,)
or something similar so that you return an iterable of artists from animate
.