code: def plot():
      start = perf_counter()
      n = 15
      pts = 100
      x = np.linspace(0, 0.8, pts)
      y = np.random.random(size=pts) * 0.8
      for i in range(n):
          for j in range(n):
              ## calling PlotWidget.plot() generates a PlotDataItem, which
              ## has a bit more overhead than PlotCurveItem, which is all
              ## we need here. This overhead adds up quickly and makes a big
              ## difference in speed.
  
              plt.addItem(pg.PlotCurveItem(x=x + i, y=y + j))
  
      dt = perf_counter() - start
      print(f"Create plots took: {dt * 1000:.3f} ms")
  
imports: from time import perf_counter
  import numpy
  import pyqtgraph
label_desc: Use image node_id 1 for calling a global function with example usage: plot() without return types