stop / start / pause in matplotlib animation
Here is a FuncAnimation example which I modified to pause on mouse clicks. Since the animation is driven by a generator function, simData, when the global variable pause is True, yielding the same data makes the animation appear paused. The value of paused is toggled by setting up an event callback: def onClick(event): global pause … Read more