I read a few questions similar to mine but none of the answers work... I want to make an animation that plots the points of a list one by one. The problem is that from rank 12, it stops. I tested gc.collect(generation=1) but it didn't work... Here is the end of my code :
@mlab.animate(delay=100)
def updateAnimation():
k=0
for k in range(len(X)):
mlab.points3d(X[k], Y[k], Z[k], S[k], color=C[k], scale_factor=10)
yield
updateAnimation()
mlab.show()
X, Y, Z, S and C are lists with a length of 136. I am using python 3.9.12 and mayavi 4.8.0. It's maybe something stupid with set... but I'm new at mayavi.
Thank you very much for any insight.
`
This (untested code) is prettymuch a copy from here http://docs.enthought.com/mayavi/mayavi/mlab.html#id10
You create the visualization once and update it in the updateAnimation procedure. The
ua = updateAnimation()stores the result in a variable so that the animation keeps running even if it is called from an asynchronous coroutine. You useset()if the shape of your data remains the same andreset()otherwise. This works with point3d and plot3d but unfortunately not with all plots in mlab.