code: def add_traces(self):
          
          y_distance = self.parent.value('y_distance')
          self.chan = []
          self.chan_pos = []
          self.chan_scale = []
  
          row = 0
          for one_grp in self.parent.channels.groups:
              for one_chan in one_grp['chan_to_plot']:
  
                  # channel name
                  chan_name = one_chan + ' (' + one_grp['name'] + ')'
  
                  # trace
                  dat = (self.data(trial=0, chan=chan_name) *
                         self.parent.value('y_scale'))
                  dat *= -1  # flip data, upside down
                  path = self.scene.addPath(Path(self.data.axis['time'][0],
                                                 dat))
                  path.setPen(QPen(QColor(one_grp['color']), LINE_WIDTH))
  
                  # adjust position
                  chan_pos = y_distance * row + y_distance / 2
                  path.setPos(0, chan_pos)
                  row += 1
  
                  self.chan.append(chan_name)
                  self.chan_scale.append(one_grp['scale'])
                  self.chan_pos.append(chan_pos)
docs: Add traces based on self.data.