Hi,
I am using a QwtPlotMagnifier object. I disabled the xBottom-axis so that the plot is magnified in the vertical direction only. I set the mouse button to NoButton because I just want to zoom by using the mouse wheel. This is the corresponding code:
mag
->setAxisEnabled
(QwtPlot::yLeft,
true);
mag
->setAxisEnabled
(QwtPlot::xBottom,
false);
mag->setMouseButton(Qt::NoButton);
mag = new QwtPlotMagnifier(par->spectrum_plot->canvas());
mag->setAxisEnabled(QwtPlot::yLeft, true);
mag->setAxisEnabled(QwtPlot::xBottom, false);
mag->setMouseButton(Qt::NoButton);
To copy to clipboard, switch view to plain text mode
Now this is my problem: The plot I want to magnify is a spectrum and I just want to increase the intensity of the signals by using the mouse wheel. But the baseline of my spectrum (y=0) usually is not centered with respect to the range of the y-axis because the signals are mostly positive and everything else was a waste of plot area.
Therefore, while magnifying, the baseline is gradually moving to the bottom part of the plot and eventually vanishes completely.
Now my question: Is there a way to magnify the y-axis while the y=0 position is held at the same screen position so that I keep my basline inside my plot?
Many thanks for any help
Bookmarks