Visualization of 3D-numpy-array frame by frame
Try re-writing the update function as
def update(val):
frame = numpy.around(sframe.val)
l.set_data(data[frame,:,:])
so that you do not need to re-create all of the matplotlib objects every update