Question

I am creating a scatterplot in Qt using Qwt. The user can choose to append several pointsets to the scatterplot. However performance is a problem. If the total number of points exceeds say 10 000 things get slow.

I am therefore looking for an algorithm implementation in C/C++ or alternatively a relatively simple 2D LOD algorithm that calculates a subset of the original total pointset and displays this instead.

Any suggestions?

Was it helpful?

Solution

No answer to your question, but I recommend to use Qwt 6.1 - or at least enable QwtPlotCurve::CacheSymbols, when using Qwt 6.0 on Windows.

Qwt 6.1 reintroduces several optimizations f.e. QwtPlotCurve::FilterPoints to avoid drawing of duplicates ( points mapped to the same position ). Caching of the symbol is auto-detected by QwtPlotCurve depending on the runtime environment.

Also have a look at the scatterplot example in Qwt 6.1, showing a curve of 100000 points. It is probably the fastest way to implement a scatterplot with Qwt ( setting RGB values multithreaded in a QImage without using QPainter ), but this one works for displaying points as Dots only.

Uwe

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top