When using animation.FuncAnimation
, is it possible to optimally reverse an animation after it plays in forward? i.e. equivalent of
FuncAnimation(.., frames=np.hstack([range(10), range(9)[::-1]]))
This redraws frames in reverse order, eating up drawing computation and memory when 50% of data is exactly the same. FuncAnimation
does have a caching mechanism, but does it or any other animation.
have a reverse=True
? Note all my data is pre-computed and retrieved via simple index for each frame.