class_docstr: Waterfall plot
docstr: Update waterfall plot
docstr_tok: ["Update","waterfall","plot"]
code: def update_plot(self, data_storage):
      """Update waterfall plot"""
      self.counter += 1
  
      # Create waterfall image on first run
      if self.counter == 1:
          self.waterfallImg = pg.ImageItem()
          self.waterfallImg.scale(
              (data_storage.x[-1] - data_storage.x[0])
              / len(data_storage.x),
              1,
          )
          self.plot.clear()
          self.plot.addItem(self.waterfallImg)
  
      # Roll down one and replace leading edge with new data
      self.waterfallImg.setImage(
          data_storage.history.buffer[-self.counter :].T,
          autoLevels=False,
          autoRange=False,
      )
  
      # Move waterfall image to always start at 0
      self.waterfallImg.setPos(
          data_storage.x[0],
          -self.counter
          if self.counter < self.history_size
          else -self.history_size,
      )
  
      # Link histogram widget to waterfall image on first run
      # (must be done after first data is received or else levels would be wrong)
      if self.counter == 1 and self.histogram_layout:
          self.histogram.setImageItem(self.waterfallImg)
  
imports: import collections, math
  from Qt import QtCore
  import pyqtgraph
label_desc: Use image node_id 3 for calling the WaterfallPlotWidget obj's underlying member method code with example usage: obj.update_plot(data_storage) without return types