def update ( self ) : if self . single_channel : self . im . set_data ( self . data [ self . ind , : , : ] ) else : self . im . set_data ( self . data [ self . ind , : , : , : ] ) self . ax . set_ylabel ( 'time frame %s' % self . ind ) self . im . axes . figure . canvas . draw ( )
setting x axis to time python imshow
Updates image to be displayed with new time frame .
def update(self):
        """Updates image to be displayed with new time frame."""
        if self.single_channel:
            self.im.set_data(self.data[self.ind, :, :])
        else:
            self.im.set_data(self.data[self.ind, :, :, :])
        self.ax.set_ylabel('time frame %s' % self.ind)
        self.im.axes.figure.canvas.draw()