PDA

View Full Version : Static scaleDivs on Form.resize



KosyakOFF
23rd April 2008, 11:39
Hi all again. Could you, please, help me? :)

For default QwtPlot changes (curve xy values/pixels) proportian.

So if I, for example, have form with size of 600x600 pixels and y scale of plot has values from 100 to 200 than i resize from to full extent or to 600x800 pixels y scale still will show values from 100 to 200 (curves will redraw accordingly of course). For me is better to set static proportion -> in this example yscale will show ~75 to 200 and curves will be same.

Is it possible to switch to this mode just changing some parameters in plot or zoomer or it's more complicated?

Sorry if I described things not so clearly.

Uwe
23rd April 2008, 20:05
In the 5.2 development branch ( = trunk ) you find a class QwtPlotRescaler, that does what you need. The navigation example shows how to use it.

It's long ago since I wrote this class, but AFAIR it is compatible with 5.0. So I guess you can simply copy the class to your source tree.

Uwe

KosyakOFF
25th April 2008, 14:29
Thanks again! ;)

KosyakOFF
25th April 2008, 14:49
By the way, how can I switch form of scale values from exponential (-8.33E4) to standart mode (-83300.0)?

Uwe
26th April 2008, 19:36
You have to overload QwtScaleDraw::label(double value) const;

Uwe

KosyakOFF
8th May 2008, 14:21
Thanks again =)