# -*- coding: utf-8 -*- \"\"\" slider 3D numpy array \"\"\" import numpy import pylab from matplotlib.widgets import Slider data = numpy.random.rand(100,256,256)
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