View Full Version : Static scaleDivs on Form.resize

23rd April 2008, 10: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.

23rd April 2008, 19: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.


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

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

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


8th May 2008, 13:21
Thanks again =)