View Full Version : Qwt zoomer does not accept new plot

11th April 2008, 13:02
Hello Qt community,

I'm quite new to Qt and its my first post here. I have a problem with the zoomer. I tried some solutions posted here but non is working. Im using Qt3 and qwt500
My Problem:
I'm plotting different curves on a qwt-chart. When not using the zoomer, the change between a graph with an x axis range 0...1 and some other graph with an x axis range from 20..200 is accomplished fine. When I use the zoomer in one of the plotted curves, plotting the next graph does not adopt its apropriate x axis scale any more, but uses the last one.
I tried the setZoomBase() before a replot but also after a replot. I even delete the zoomer before a new replot, and create it after the replot. It's not working.

The code fragment:

// delete zoomer
if(NULL != canvasZoomer)
delete canvasZoomer;

// all curves calculated , do replot

// create zoomer
canvasZoomer = new QwtPlotZoomer( QwtPlot::xBottom, QwtPlot::yLeft, qwtChartVisu->canvas() );
canvasZoomer->setSelectionFlags( QwtPicker::DragSelection );

Thank you and kind regards!

14th April 2008, 06:49
As soon as you zoom in, you are assigning specific scales, turning autoscaling off. You have to re-enable autoscaling, before you display the next graph.


21st December 2010, 14:48
how do you "re-enable autoscaling" ? which is the proper function to do that and where should i call it from?

21st December 2010, 14:51
RTFM (http://qwt.sourceforge.net/class_qwt_plot.html)

hint: search for "autoscale"