class_docstr: A set of lines that are temporally aligned on a trigger.
  
  Data is added in chunks to the oscilloscope, and each new chunk creates a
  new line to draw. Older lines are slowly faded out until they are removed.
  
  Parameters
  ----------
  n_lines : int
      The maximum number of lines to draw.
  line_size : int
      The number of samples in each line.
  dx : float
      The x spacing between adjacent samples in a line.
  color : tuple
      The base color to use when drawing lines. Older lines are faded by
      decreasing their alpha value.
  trigger : tuple
      A set of parameters (level, height, width) that determine how triggers
      are detected.
  parent : Node
      An optional parent scenegraph node.
class_docstr_tok: ["A","set","of","lines","that","are","temporally","aligned","on","a","trigger",".","Data","is","added","in","chunks","to","the","oscilloscope",",","and","each","new","chunk","creates","a","new","line","to","draw",".","Older","lines","are","slowly","faded","out","until","they","are","removed",".","Parameters","--","--","--","--","--","n_lines",":","int","The","maximum","number","of","lines","to","draw",".","line_size",":","int","The","number","of","samples","in","each","line",".","dx",":","float","The","x","spacing","between","adjacent","samples","in","a","line",".","color",":","tuple","The","base","color","to","use","when","drawing","lines",".","Older","lines","are","faded","by","decreasing","their","alpha","value",".","trigger",":","tuple","A","set","of","parameters","(","level",",","height",",","width",")","that","determine","how","triggers","are","detected",".","parent",":","Node","An","optional","parent","scenegraph","node","."]
code: def plot(self, data, dx=0):
      self.set_data(self.plot_ptr, data)
  
      np.multiply(
          self.color[..., 3],
          0.98,
          out=self.color[..., 3],
          casting="unsafe",
      )
      self.color[self.plot_ptr, 3] = 50
      self.set_color(self.color)
      self.pos_offset[self.plot_ptr] = (dx, 0, 0)
      self.set_pos_offset(self.pos_offset)
  
      self.plot_ptr = (self.plot_ptr + 1) % self._data_shape[0]
  
file_path: vispy/examples/demo/scene/oscilloscope.py
imports: from __future__ import division
  import threading
  import atexit
  import numpy
  from vispy import app, scene, gloo, visuals
  from vispy.util.filter import gaussian_filter
label_desc: Use image node_id 3 for calling the Oscilloscope obj's underlying member method code with example usage: obj.plot(data, dx) without return types