The easiest way to make a live animation in Matplotlib is to use one of the Animation classes. In both cases it is critical to keep a reference to the instance object. The animation is advanced by a ...
The canonical FuncAnimation example does not work in https://molab.marimo.io (nor in https://marimo.app for that matter) even though it works in plain old jupyter and even pyscript. mo.mpl.interactive ...
Hacking MovieWriter import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation, FFMpegWriter class HackedFFMpegWriter(FFMpegWriter): def grab_frame(self, **savefig_kwargs): # ...