Try looking into PGLive <https://github.com/domarm-comat/pglive> Its Thread 
safe and easy to implement.
>From the site.
By default, pyqtgraph doesn't support live plotting. Aim of this package is 
to provide easy implementation of Line, Scatter and Bar Live plot.
Every plot is connected with it's DataConnector, which sole purpose is to 
consume data points and manage data re-plotting.
DataConnector interface provides Pause and Resume method, update rate and 
maximum number of plotted points.
Each time data point is collected, call DataConnector.cb_set_data or 
DataConnector.cb_append_data_point callback.
That's all You need to update plot with new data. Callbacks are Thread 
safe, so it works nicely in applications with multiple data collection 
Threads.

On Wednesday, October 12, 2022 at 10:03:42 AM UTC-8 [email protected] 
wrote:

> Hi everyone,
>
> I recently started using pyqt with matplotlib (due to quality work) and 
> wanted to know your suggestions on going to one of the two ways for 
> creating a real time plot widget. I am talking about using threads or using 
> multiprocessing module. 
>
> Previously, I have used python threads for Tkinter GUIs and that worked 
> well but not the best. as using matplotlib is not thread safe and all I 
> could do is separate plot process in different threads but not speed up the 
> plotting for real time in the case of sampling every 10 ms. 
>
> Now thatI am using PyQT, I am wondering whether I should use QThreads, 
> Python Threads or multiprocessing module and wanted to know people's 
> opinions about the same. I am sticking with matplotlib due to it's quality 
> work, unlike pyqtgraph, but I am open to change to any other library which 
> would be as good as matplotlib as well as is thread safe. After all, I just 
> need to have 10 or so figures running paralley, with other parts of the 
> GUI, with also communicating changes in data amongst them. 
>
> Thanks in advance!
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/bea0888f-d040-459d-a7ff-fd989de04fadn%40googlegroups.com.

Reply via email to