code: def add_lines(self, lines, color=(1, 1, 1), width=5, label=None, name=None):
          
          if not isinstance(lines, np.ndarray):
              raise Exception('Input should be an array of point segments')
  
          lines = vtki.lines_from_points(lines)
  
          # Create mapper and add lines
          mapper = vtk.vtkDataSetMapper()
          mapper.SetInputData(lines)
  
          rgb_color = parse_color(color)
  
          # legend label
          if label:
              if not isinstance(label, str):
                  raise AssertionError('Label must be a string')
              self._labels.append([lines, label, rgb_color])
  
          # Create actor
          self.scalar_bar = vtk.vtkActor()
          self.scalar_bar.SetMapper(mapper)
          self.scalar_bar.GetProperty().SetLineWidth(width)
          self.scalar_bar.GetProperty().EdgeVisibilityOn()
          self.scalar_bar.GetProperty().SetEdgeColor(rgb_color)
          self.scalar_bar.GetProperty().SetColor(rgb_color)
          self.scalar_bar.GetProperty().LightingOff()
  
          # Add to renderer
          self.add_actor(self.scalar_bar, reset_camera=False, name=name)
          return self.scalar_bar
docs: Adds lines to the plotting object.
  
          Parameters
          ----------
          lines : np.ndarray or vtki.PolyData
              Points representing line segments.  For example, two line segments
              would be represented as:
  
              np.array([[0, 0, 0], [1, 0, 0], [1, 0, 0], [1, 1, 0]])
  
          color : string or 3 item list, optional, defaults to white
              Either a string, rgb list, or hex color string.  For example:
                  color='white'
                  color='w'
                  color=[1, 1, 1]
                  color='#FFFFFF'
  
          width : float, optional
              Thickness of lines
  
          name : str, optional
              The name for the added actor so that it can be easily updated.
              If an actor of this name already exists in the rendering window, it
              will be replaced by the new actor.
  
          Returns
          -------
          actor : vtk.vtkActor
              Lines actor.