0

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. For the record, I want this to be built in as a widget within the GUI not a separate pop-up window.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
sudobangbang
  • 1,406
  • 10
  • 32
  • 55
  • I've generally found matplotlib slow for displaying live data. I believe pyqtgraph is faster, but must admit I haven't tried live updating with pyqtgraph myself (only saw an example while I was using it for something else) – three_pineapples Jun 19 '14 at 23:39
  • MatPlotLib ended up working, I simply redrew the graph once a second but limited the x axis to only display 10 points. While inefficient, it will work for my purposes – sudobangbang Jun 24 '14 at 12:12

2 Answers2

0

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.

Community
  • 1
  • 1
Mihai8
  • 3,113
  • 1
  • 21
  • 31
  • I have been attempting to use the pyQt Matplotlib widget, and while it can recognize the data is coming in, it is having trouble with .draw(). The x and y axis change their size, but aside from that there is no visual difference. I will look over my code again. – sudobangbang Jun 19 '14 at 13:23
0

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.

french13
  • 75
  • 1
  • 7