Code below. The issue is I don't know how to get the current visible rescaled rectangle from the plot without going to the zoomer.
// rescale the main plot
setAxisScale
(QwtPlot::yLeft,lowPlotY,highPlotY
);
// how to get the current visible rescaled plot rectangle??
QwtDoubleRect boundRect = ????
// get the zoomer stack
QStack<QwtDoubleRect> tmpStack = plot_zoomer->zoomStack();
// get rid of the latest non scaled rectangle
tmpStack.pop();
// add rescaled rectangle
tmpStack.push(boundRect);
plot_zoomer->setZoomStack(tmpStack);
replot();
// doesn't work, rescales back to original
plot_zoomer->moveBy(valdx,0);
// rescale the main plot
setAxisScale(QwtPlot::yLeft,lowPlotY,highPlotY);
// how to get the current visible rescaled plot rectangle??
QwtDoubleRect boundRect = ????
// get the zoomer stack
QStack<QwtDoubleRect> tmpStack = plot_zoomer->zoomStack();
// get rid of the latest non scaled rectangle
tmpStack.pop();
// add rescaled rectangle
tmpStack.push(boundRect);
plot_zoomer->setZoomStack(tmpStack);
replot();
// doesn't work, rescales back to original
plot_zoomer->moveBy(valdx,0);
To copy to clipboard, switch view to plain text mode
Bookmarks