Skip to content Skip to sidebar Skip to footer

Live Data Monitor: Pyqtgraph

I am working on a project where I will have to analyse signals coming from a device. I have a library working which gets me data from the device. As of now, I am collecting the dat

Solution 1:

To make a plot scroll, you have three options:

  1. Scroll the raw data and re-plot (see numpy.roll)

    curve = plotItem.plot(data)
    data = np.roll(data, 1)  # scroll data
    curve.setData(data)      # re-plot
    
  2. Move the plot curve so that it slides across the view:

    curve = plotItem.plot(data)
    curve.setPos(x, 0)  # Move the curve
  3. Move the view region such that the plot curve appears to scroll

    curve = plotItem.plot(data)
    plotItem.setXRange(x1, x2)  # Move the view

The scrolling-plots example (currently only in the development version) demonstrates each of these:

Post a Comment for "Live Data Monitor: Pyqtgraph"