Updating a Plot with pyqtgraph

Dear Forum.
Im using PySide6 from October circa, and, I develop a data visualizer interface, running on Widow,Linux, Rasp…and with sql
as databese… The Rasp via SPI ask data to external sensor, and visualize the data in the GUI. Speed of data request is increasing,so, I have 2 question:

  1. Plot is time consuming: I decided to plot only 1 data every N data arrived (during the data acquisition i means). Question is how to add new data to the plot, without replot all (so, spending less time in plot ).
    2)I have a Timer, and, inside the timer, i ask and receive data.My idea is to create a thread for data plot ,avoiding to plot inside the timer. Question is : what happend if , during the Thread, the timer get a intettupt (timer want start) …The thread will pause, and timer get priority ?? For me, timer interval is the priority.

Thanks for your time
Roberto

It sounds to me like you are trying to make a scrolling plot. Perhaps a good place to start is the scrollingPlots.py example that pyqtgraph has in their package.

Thanks for reply…I will test soon.