I have two problems with axes that I encountered while using QwtPlot:
1. Some curves are scaled with margins some aren't:
Attachment 11881
This curve has values in 0-100 range, precisely. And it is scaled precisely 0-100.
Attachment 11882
This curve as you can see (I plotted two of them at the same time) is nearly absolutely identical BUT it's upper value is 100.517 and lower is -0.489989, and so we get margins. But I want to ALWAYS have these margins (or never have them, but I like them and I would rather prefer them to stay). How can I do that? No matter if signal is perfectly 0-100 or not, I always want margins, because when I plot few curves at once using different scales I will get this:
Attachment 11883
It makes comparison of very similar signals pretty painful, because autoscale may forget about adding margins. And I would rather want to use autoscale, so I will not have to mess my code even more with fully manual scales.
2. Axes seem to ignore out-of-scale changes in data model.
I use my own QwtSeriesData so I will not have to copy any values anywhere. I catch signal from my dataset saying that value of sample has changed. And then I do this:
Code:
qDebug() << "no zoomer, no multiaxes mode"; this->setAutoReplot(true); // it does not replot this change automatically this->setAxisAutoScale(QwtAxisId(0,0),true); // I want my axis to rescale automatically to new data this->replot(); // replot to see changes, autoreplot does not work in this situation for some reasons zoomer->setZoomBase(bounds); // with code above I actualize zoomer to new base, as changed sample could change upper or lower value qDebug() << "new zoom base: " << bounds;
And get this in debug:
And my plot looks like that:
Attachment 11884
As you can see, curve sees the change in data (but autoreplot does not work on it's own, I had to manually force replot to see this change), yet my axis totally ignores, that it's new upper value should be 500 now. What should I do to convince my axis that it is really nice idea to change it's upper value without setting axes manually?
