code: def update(ev):
      global myfunc, index, up, levels2, noise, cmap, color
  
      if index > 0 and index < 25:
          # update left panes rolling upwards
          noise = np.roll(noise, 1, axis=0)
          image1.set_data(noise)
          curve1a.set_data(noise)
          curve1b.set_data(noise)
  
          # update colors/colormap
          if (index % 5) == 0:
              curve1b.color = next(color)
              cm = next(cmap)
              image2.cmap = cm
              curve2b.color = cm
  
          # change isocurves by clipping data/or changing limits
          # update curve1b levels (clip)
          curve1b.levels = levels1[index:-index]
  
          # update curve2b data with clipped data
          im2 = np.clip(myfunc, clip[index], clip[-index])
          curve2b.set_data(im2)
  
          index += up
      else:
          # change index direction
          up = -up
          index += up
  
      canvas.update()
  
file_path: vispy/examples/scene/isocurve_updates.py
imports: import sys
  import numpy
  from itertools import cycle
  from vispy import app, scene
  from vispy.scene import STTransform
  from vispy.util.filter import gaussian_filter
  from vispy.color import get_colormaps, get_color_names
label_desc: Use image node_id 1 for calling a global function with example usage: update(ev) without return types