code: def __init__(self):
      app.Canvas.__init__(self, keys="interactive", size=(800, 800))
  
      self.n_iterations = 0
  
      self.text_parts = [
          "This",
          "is",
          "a",
          "multicolored",
          "scattered",
          "text",
      ]
  
      self.x = 100 + np.arange(len(self.text_parts)) * 100
      self.y = 400 + (np.sin(2 * np.pi * (self.x / self.x[-1])) * 100)
  
      self.text_positions = np.c_[self.x, self.y]
  
      color = np.ones((len(self.text_parts), 4), dtype=np.float32)
      color[:, 0] = np.linspace(0, 1, len(self.text_parts))
      color[:, 1] = color[::-1, 0]
  
      self.colors = color
  
      self.text = visuals.TextVisual(
          self.text_parts,
          bold=True,
          pos=self.text_positions,
          color=self.colors,
      )
  
file_path: vispy/examples/basics/visuals/text_scatter.py
imports: import sys
  from vispy import app, gloo, visuals
  import numpy
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: app with example: obj = Canvas()