A dynamically updating graph for PyQt GUI

孤街醉人 提交于 2019-12-11 17:26:48

问题


I have developed a Qt GUI using Qt4 and PyQt. I am trying to implement a graph that will dynamically "live update" the graph to represent the rate at which the data is being transmitted in a (data/sec format). However, the problem lies within implementing a graph that can cleanly live update, not finding the speed. Any suggestions would be greatly appreciated. For the record, I want this to be built in as a widget within the GUI not a separate pop-up window.

Regards,

sudo!!


回答1:


I suggest you to use two threads: One for acquiring data from somewhere, the other for representing it's graphics. You can take a look on A “live” data monitor with Python, PyQt and PySerial or to pyQt Matplotlib widget live data updates.




回答2:


I've used qCustomPlot (website here) with pretty good success. I can live-update several thousand data points and it's all very straightforward to use.



来源:https://stackoverflow.com/questions/24307521/a-dynamically-updating-graph-for-pyqt-gui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!