I'm using PyQwt to plot a moderate data set (666528 points) and its takes a rdiculously long time to replot zoom, ect.
ncalls tottime percall cumtime percall filename:lineno(function)
1 2.115 2.115 2.116 2.116 {built-in method replot}
I was expecting something closer to 100mS rather than 2.1sec
It looks like others have been having the same issues with Qwt but the solution sugestions have all pertained to options available in Qwt6, but there are only python bindings for v5.
Thus, I'm using Qwt version 5.2.1 with Python 2.7.2.
In Qwt6 the suggestion have been to set the Paint Attributes for ClipPolygons, FilterPoints, MinimizeMemory , ImageBuffer apportiatly. From what I understand the problem is with drawing all the points which largly maps to the same pixels and the paint repaints the same pixel over and over again, rather than just painting the pixels once.
I've tried setting a few attributes I do have available on the Plot Curve as follows but with no noticable differance in speed.
def addSignals(self, signals):
for signal in signals:
curve = QwtPlotCurve(signal.name())
curve.setPaintAttribute(QwtPlotCurve.PaintFiltered, False)
curve.setPaintAttribute(QwtPlotCurve.ClipPolygons, True)
curve.setData(signal.x(), signal.y())
curve.setRenderHint(QwtPlotItem.RenderAntialiased)
curve.setPen(QPen(Qt.cyan))
curve.attach(self)
self.replot()
The data being loaded into PlotCurve object via setData is a numpy array from the signal object. And the method shown is attached to a subclassed QwtPlot object
Am I missing an options that available in my Qwt Version or is this only practical in v6? What are my options in speeding this up?
Thanks