Zooming problem with QwtSymbol::Ellipse
Hi!
I can't find a solution to solve one problem.
I draw a plot with a simple curve. What I need is:
1) to mark every point with a circle (QwtSymbol::Ellipse) and
2) to provide zooming
I faced with a problem that after a several zooms I get extra strange points that are not lie on the curve and have unreasonable data.
Here is a code example:
Code:
public:
void drawPlot();
private:
};
=====================================
{
_curve.
setPen(QPen(Qt
::black));
sym.
setPen(QPen(Qt
::black));
sym.setBrush(brush);
sym.setSize(5);
_curve.setSymbol(sym);
_curve.attach(this);
QwtDoubleRect rect(0, 0, 3000, 3000);
_zoomer->setZoomBase(rect);
drawPlot();
}
void Plot::drawPlot(){
QVector<double> x(3000);
QVector<double> y(3000);
for (int i = 0; i < 3000; i++)
{
x[i] = i;
y[i] = i;
}
_curve.setData(x, y);
replot();
}
I get this only with a QwtSymbol::Ellipse but never with Rect, Diamond or Cross.
Thanks for any help!
Re: Zooming problem with QwtSymbol::Ellipse
Installation of new qwt software version (qwt-6.0.0-rc5) fixed the problem.
Re: Zooming problem with QwtSymbol::Ellipse
Hi,
I have qwt-6.0.0-rc5. The symbols are plotted perfectly fine,
but when I want to zoom I get a segmentation fault.
Code:
sym.
setPen(QPen(Qt
::black));
sym.setBrush(brush);
sym.setSize(1);
continuumCurve->setSymbol(&sym);
Re: Zooming problem with QwtSymbol::Ellipse
In Qwt 6.x the symbol needs to be allocated by new. This is something you can expect from all parameters, that are passed as pointer ( in opposite to references ).
Uwe
Re: Zooming problem with QwtSymbol::Ellipse