The rescaler implicitely calls setAxisScale(), what disables autoscaling. Guess if you reenable autoscaling before calling updateAxes you probably have what you want:
void Window::switchData()
{
if ( curve->maxYValue() > LO ) curve->setData( DATA_LO, DATA_LO, N );
else curve->setData( DATA_HI, DATA_HI, N );
for ( int axis
= 0; axis <
QwtPlot::axisCnt; axis
++ ) plot->setAxisAutoScale(axis);
plot->updateAxes();
rescaler->rescale();
}
void Window::switchData()
{
if ( curve->maxYValue() > LO ) curve->setData( DATA_LO, DATA_LO, N );
else curve->setData( DATA_HI, DATA_HI, N );
for ( int axis = 0; axis < QwtPlot::axisCnt; axis++ )
plot->setAxisAutoScale(axis);
plot->updateAxes();
rescaler->rescale();
}
To copy to clipboard, switch view to plain text mode
HTH,
Uwe
Bookmarks