Let me start by saying pyqtgraph is amazing. I am developing a UI for a mouse ventilator that runs of a combination of arduino and raspberry pi. The UI needs to display multiple pressure readings, EKG information, as well as a few other signals in real time. We originally tried to use matplotlib, but it just wasnt fast enough to keep up - even with blitting etc. We switched to pyqtgraph and were amazed. Real time is now acheivable, but we are right at the threshold of the speed we need. Im hoping to squeek another 20% or so out of our performance.
Heres how it works: I have a dedicated thread for fetching data every 0.0005 sec. Thats its only job and all it does. Then there is a plotting loop that plots the last ~10000 data points of 6 lines in 3 separate plot windows. The data fetching thread seems fast enough, but it seems that I can't plot the data fast enough (the graph updates in chunks). I think its because I am unnecessarily redrawing the graph, but I could be wrong. Every time the graph updates, I call setData on all the lines and pass them new x and y values to display. Does each setData call result in the graph updating? If so, is there any way to update a bunch of lines in batch, then just redraw the UI in batch? I have turned off autoscaling of the x axis, and I update the x axis periodically (every ~10 sec), which helped performance some. Can you think of any other ways i could speed this up? If you need/want to look at all the code, its on github: https://github.com/ScottHaileRobertson/DukeVentilator Thanks so much for this great plotting library, and for any help you can provide! Best, Scott -- 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/95b5c87e-89a0-44ea-b18e-144a0692c203%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
