PDA

View Full Version : Problem with QwtPlotIntervalCurve



SandyEmerald
11th October 2013, 15:39
I' m using Qwt 6.0.1 undex Linux. Here's code example:


QwtPlotIntervalCurve *curve = new QwtPlotIntervalCurve("Test interval curve");

QVector<QwtIntervalSample> samples;
QwtIntervalSample *sample;
sample = new QwtIntervalSample(DBL_MIN, 300, 700);
samples.push_back(*sample);
sample = new QwtIntervalSample(DBL_MAX, 300, 700);
samples.push_back(*sample);

curve->setSamples(samples);
curve->setStyle(QwtPlotIntervalCurve::Tube);

curve->attach(ui->plot);

ui->plot->replot();


After running i saw this:
9688

and after i made right-click (i have default QwtPlotZoomer) i saw this:
9689

So, how i can set infinite interval curve, Uwe?

Uwe
11th October 2013, 15:57
Sound like you want to use Qwt 6.1 and QwtPlotZoneItem. If you can't use 6.1 it should be easy to copy the implementation of QwtPlotZoneItem and port it back to 6.0

Uwe

SandyEmerald
11th October 2013, 16:16
Omg, so may problems with this DBL_MIN/DBL_MAX values ;)
Uwe, could you tell me why QwtPlotIntervalPicker doesn' t support it?