code: def fastPlot():
      ## Different approach:  generate a single item with all data points.
      ## This runs many times faster.
      start = perf_counter()
      n = 15
      pts = 100
      x = np.linspace(0, 0.8, pts)
      y = np.random.random(size=pts) * 0.8
      shape = (n, n, pts)
      xdata = np.empty(shape)
      xdata[:] = x + np.arange(shape[1]).reshape((1, -1, 1))
      ydata = np.empty(shape)
      ydata[:] = y + np.arange(shape[0]).reshape((-1, 1, 1))
      conn = np.ones(shape, dtype=bool)
      conn[..., -1] = False  # make sure plots are disconnected
      item = pg.PlotCurveItem()
      item.setData(xdata.ravel(), ydata.ravel(), connect=conn.ravel())
      plt.addItem(item)
  
      dt = perf_counter() - start
      print("Create plots took: %0.3fms" % (dt * 1000))
  
imports: from time import perf_counter
  import numpy
  import pyqtgraph
label_desc: Use image node_id 2 for calling a global function with example usage: fastPlot() without return types