Matplotlib FuncAnimation: when to stop?

According to the matplotlib documentation, it FuncAnimationcalls funtion repeatedly to create the animation.

The question is, how should I FuncAnimation()stop when no more image data is available?

+4
source share
2 answers

If you know how many frames there are in your image data, then make sure that among the other arguments in FuncAnimation()you have:

frames=#frames
repeat=False

Then it stops when it reaches the limit of the frame. Not perfect, but it seems like a common problem without the right solution.

+1
source

From: http://matplotlib.org/api/animation_api.html

FuncAnimation (fig, func, frames = None, init_func = None, fargs = None, save_count = None, ** kwargs)

"... , ..."

, , .

0

Source: https://habr.com/ru/post/1569251/


All Articles