class_docstr: Main spectrum plot
docstr: Recalculate persistence data and update persistence curves
docstr_tok: ["Recalculate","persistence","data","and","update","persistence","curves"]
code: def recalculate_persistence(self, data_storage):
      """Recalculate persistence data and update persistence curves"""
      if data_storage.x is None:
          return
  
      self.clear_persistence()
      self.persistence_data = collections.deque(
          maxlen=self.persistence_length
      )
      for i in range(
          min(
              self.persistence_length,
              data_storage.history.history_size - 1,
          )
      ):
          data = data_storage.history[-i - 2]
          if data_storage.smooth:
              data = data_storage.smooth_data(data)
          self.persistence_data.append(data)
      QtCore.QTimer.singleShot(
          0, lambda: self.update_persistence(data_storage, force=True)
      )
  
imports: import collections, math
  from Qt import QtCore
  import pyqtgraph
label_desc: Use image node_id 20 for calling the SpectrumPlotWidget obj's underlying member method code with example usage: obj.recalculate_persistence(data_storage) without return types