Hi all!
Could you, please, help me?
I've enabled yLeft and yRight on the QwtPlot.
I'm using setAxisAutoScale and it works for yLeft, but the labels on yRight are not changing in the same way like yLeft does.... (actually, they're not changing at all, in AutoScale mode)
But it works fine with logScale...
Am I did something wrong?..
basically, here is the code:
if (baseWidget->isYLogScale()) {
}
else {
}
plot
->setAxisScaleEngine
(QwtPlot::yLeft, scaleEngineLeft
);
plot
->setAxisScaleEngine
(QwtPlot::yRight, scaleEngineRight
);
if (baseWidget->isYAutoScale()) {
plot
->setAxisAutoScale
(QwtPlot::yLeft);
plot
->setAxisAutoScale
(QwtPlot::yRight);
//TODO: doesn't work :(}
else {
plot
->setAxisScale
(QwtPlot::yLeft, baseWidget
->getYMin
(), baseWidget
->getYMax
());
plot
->setAxisScale
(QwtPlot::yRight, baseWidget
->getYMin
(), baseWidget
->getYMax
());
}
if (baseWidget->isYLogScale()) {
scaleEngineLeft = new QwtLog10ScaleEngine();
scaleEngineRight = new QwtLog10ScaleEngine();
}
else {
scaleEngineLeft = new QwtLinearScaleEngine();
scaleEngineRight = new QwtLinearScaleEngine();
}
plot->setAxisScaleEngine(QwtPlot::yLeft, scaleEngineLeft);
plot->setAxisScaleEngine(QwtPlot::yRight, scaleEngineRight);
if (baseWidget->isYAutoScale()) {
plot->setAxisAutoScale(QwtPlot::yLeft);
plot->setAxisAutoScale(QwtPlot::yRight); //TODO: doesn't work :(
}
else {
plot->setAxisScale(QwtPlot::yLeft, baseWidget->getYMin(), baseWidget->getYMax());
plot->setAxisScale(QwtPlot::yRight, baseWidget->getYMin(), baseWidget->getYMax());
}
To copy to clipboard, switch view to plain text mode
thanx a lot!!
Tim.
Bookmarks