Need help with a 3D matrix simulation/animation

I made a 3d array using numpy.meshgrid, and created an update function that works through the array and updates each cell. I use pyplot.scatter to show the grid.
I am stuck on how to animate this grid after each step of the updateFunction and create an animated visualisation.
Here are some more details I posted on StackOverflow:
StackOverflow question