Hi, I am working on displaying real-time telemetry data using pyqtgraph. I am quite pleased with the visual results however I am having issues with the frame rate dropping as more data is plotted. I am receiving about 100 data points per second. At the beginning plotting is quite fast but the frame right dives rapidly as more data is being displayed.
I have fixed the size of the plots and auto-ranging is disabled, I have tried down sampling and it helps, but not quite enough. I am looking for the fastest way to plot a large amount of data points in real-time, as I receive them.
I have found other posts about speed and some of them reference ‘arrayToQPath’, but I am not sure if that is the best way to approach my issue. My biggest concern is with plotting the data points as quickly as possible as to not slow down the rest of the event loop. The current way that I am plotting data in the ‘PlotWidget’ is setting the data of a ‘PlotDataItem’ in the following manner, where the arguments are either a numpy array or python list: ‘plot_data_item.curve.setData(data['time'][self.x_min:], data[data_type][self.x_min:])’. I have tried plotting a new curve each time, but that seemed to be quite slow. In an ideal world I would just be able to append points without having to connect all of the previous points to each other. At some point I want to reset the plot to an empty plot, but that really isn’t an issue because this is a rare occurrence in my program. I simply want to display in real time several minutes of data with multiple different plots, each of fixed size with no scrolling, panning, or auto-resizing.
I would not be opposed to threading some of the work out if that is an option on top of any suggestions you have. Something I am not entirely clear on is if the GIL is an issue when it comes to QThreads since they are C++? Will I get any performance boost by using QThreads in the update function? I am reading from a data queue in the update function, so ideally that would be taken out of the loop. That however isn’t my main concern because if I reset the plots (change the range of data that is taken from my data list/array the frame right jumps right back up).
I am using the Dev Branch because my application requires PYQt5 and python 3.5.
Any suggestions you have would be greatly appreciated!
--
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 pyqtgraph+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/4e08f9bc-4380-4d08-9148-755463f2e976%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/750f1594-d03f-43a8-be00-89b8ae83dab2%40googlegroups.com.