Hello,

I'm using Qwt to plot measurement data (distance) against time. The plot is updated continuously with new data and only the last x samples (x is set by the user) are plotted. So far this works just fine. The x-value is an integer value encoding time, where one digit is (usually) worth 50µs (also user adjustable, but always known to me).

For now the x-axis is labelled with the raw integer value. I'd like for the user to be able to choose a physical unit (µs, ms, s, min) for labeling or chose a unit automatically.

I've fiddled around with a custom QwtScaleDraw and got that to work for fixed values, but that is quite ugly and apparently QwtThermo can convert between physical units automagically: "By default, the scale and range run over the same interval of values. QwtAbstractScale::setScale() changes the interval of the scale and allows easy conversion between physical units."

However, I don't understand how this works. I read the QwtThermo source and tried to figure out what is going on but to no avail. I tried to set QwtPlot::setAxisScale() with scaled values ([0]), but that didn't work.
Could someone tell me if this is possible and if so, how to go about it?

Pertaining to automatic scaling, I know I have to implement a custom QwtScaleEngine dealing properly with time: [0], [1].

Thank you for your time & best regards

[0] http://www.qtcentre.org/threads/3257...ion-in-QwtPlot
[1] http://qt-project.org/forums/viewthread/12173