QwtPlot very slow for FACS plot (many marker points)
Hi,
I am generating a FACS plot, which is simply a large number of points, each a QwtPlotMarker:
for (i=0; i<Global::nFACS_cells; i++) {
x = Global::FACS_data[Global::nvars_used*i+kvar_x];
y = Global::FACS_data[Global::nvars_used*i+kvar_y];
x = xscale*x;
y = yscale*y;
y = max(y,1.01*ymin);
if (x >= xmin) {
QwtPlotMarker* m = new QwtPlotMarker();
m->setSymbol( symbol );
m->setValue( QPointF( x,y ) );
m->attach( qpFACS );
}
}
when nFACS_cells = 80k this is taking 35 seconds (Qwt 5.2.1, Windows 7, Core i7).
Is there something I can do to speed this up? I don't want to go to a later Qwt version unless absolutely necessary.
Thanks
Gib
Re: QwtPlot very slow for FACS plot (many marker points)
Quote:
Originally Posted by
gib
... a large number of points, each a QwtPlotMarker:
What is already the answer to your question - using a marker for each point is probably the most uneffician implementation possible.
Why not simply using a curve ?
Uwe
Re: QwtPlot very slow for FACS plot (many marker points)
Hi Uwe,
A FACS (or flow cytometry) plot is made up of a large number of dots:
https://www.google.com/search?q=facs...w=1920&bih=918
Can I achieve this result with a curve?
Gib
Re: QwtPlot very slow for FACS plot (many marker points)
Quote:
Originally Posted by
gib
Can I achieve this result with a curve?
Yes of course - check the examples.
For the situation of having a dot of 1x1 pixels as symbol, there is a special optimization being shown in the scatterplot example.
Uwe
Re: QwtPlot very slow for FACS plot (many marker points)
Thanks Uwe, I don't know how I missed this. I'll recode and check the timing.
Gib
Re: QwtPlot very slow for FACS plot (many marker points)
Quote:
Originally Posted by
gib
I'll recode and check the timing.
Please post the new numbers - it might be interesting for others to see the difference.
Uwe
Re: QwtPlot very slow for FACS plot (many marker points)
The speedup using a curve plot is amazing - about 70ms to plot 100k points.
Thanks a million, Uwe.