I started my project with Qt 4.6.3 and qwt 6.1.0. But since debian squeeze forced me to use an earlier version of qwt (not sure which, since I'm still a linux noob. I just know that I installed libqwt5-qt4, meaning header files in /usr/include/qwt-qt4), I've been running into a couple of problems.
My plot shows a curve connecting dots. Each dot also has a qwtSymbol (a small 5x5px elipse) attached to it, since I needed to show with colors 3 different types of points. I've been working mostly with a set of data consisting of about 4k different points. With qwt 6.1.0 everything worked rather smoothly - and by that I mean that zoomer, panner or magnifier were fast. Now, after switching the version of qwt, it just works so slow... e.g. after selecting the zoomer rectangle the plot just freezes for about 5 seconds (or sometimes just hangs, or I lose my patience too quickly). I thought, maybe the replotting of that many symbols (actually markers with symbols) were the reason, but after commenting the symbol functionality out, it still is very slow.
When I tried with a data set of 20 points, everything works well.
Btw, after changing the qwt version I checked the virtual functions in classes inheriting from qwt classes to make sure the variables and names were appropriate (checked with qwt 5.2.1 documentation), so that should work fine.
Any ideas? suggestions? (oh, and I am not using any antialiasing or setting any other render hints)
This is some of my code (2 functions from plot constructor):
void MyPlot::setupAxes(){
zoomOutToBase();
//createScaleDividerForY_axis();
discreteScaleDraw= new DiscreteScaleDraw(dataFromSources);
timeScaleDraw= new TimeScaleDraw;
setAxisScaleDraw
(QwtPlot::yLeft, discreteScaleDraw
);
setAxisScaleDraw
(QwtPlot::xBottom, timeScaleDraw
);
//disable minor ticks for y axis
}
void MyPlot::setupAxes(){
setAxisTitle(QwtPlot::xBottom, QString(UNIT));
setAxisTitle(QwtPlot::yLeft, QString("Process ID"));
zoomOutToBase();
//createScaleDividerForY_axis();
discreteScaleDraw= new DiscreteScaleDraw(dataFromSources);
timeScaleDraw= new TimeScaleDraw;
setAxisScaleDraw(QwtPlot::yLeft, discreteScaleDraw);
setAxisScaleDraw(QwtPlot::xBottom, timeScaleDraw);
//disable minor ticks for y axis
setAxisMaxMinor(QwtPlot::yLeft,0);
}
To copy to clipboard, switch view to plain text mode
void MyPlot::addPoints(){
QPolygonF points
=dataFromSources
->getPoints
();
curve->setData(points);
curve->attach(this);
// dotManager=new DotManager(this);
// dotManager->addDotsToPlot(dataFromSources->tracedPoints);
}
void MyPlot::addPoints(){
QPolygonF points=dataFromSources->getPoints();
curve->setData(points);
curve->attach(this);
// dotManager=new DotManager(this);
// dotManager->addDotsToPlot(dataFromSources->tracedPoints);
}
To copy to clipboard, switch view to plain text mode
PS. I case you want to see how the plot looks like, it's sth like this:
http://tinypic.com/view.php?pic=2znp...8#.UvNkDoZhauY
Bookmarks