I'm trying to simulate the interactions between cells on a growth medium. The problem is that I used many arcs to depict the deformed cell membranes so it is difficult to use methods like set_data
. Is there a way to plot the frame one by one with an axes
instance?
This is what I want:
def anim_func(i, ax, cells):
ax.clear_all_patches()
cells.update(i)
plot_cells(ax, cells)
return something
cells = Cells(...)
anim = animation.FuncAnimation(fig, anim_func, fargs=(ax, cells), ...)