Hello,
I am using a QwtPlotMagnifier but I don't find the way to set the zoom for initial zoom (similar to zoombase when using QwtPlotZoomer) ...
Somebody has any suggestion ?
Thanks in advance,
Joel.
Hello,
I am using a QwtPlotMagnifier but I don't find the way to set the zoom for initial zoom (similar to zoombase when using QwtPlotZoomer) ...
Somebody has any suggestion ?
Thanks in advance,
Joel.
What do you expect from something like an "initial zoom" ?
Uwe
Hi Uwe,
Thanks for your reply !
I have a class that inherits QwtPlot and that displays some geometric entities. I am able to compute a "bounding box" for all these geometric entities (ie xmax, ymax, xmin, ymin).
I'm using QwtPlotMagnifier to handle zooming. I would like to set the initial value of the zoom of the QwtPlotMagnifier so that all the geometric entities are shown (ie ensure that xmax, ymax, xmin, ymin are displayed on the plot)
I hope my question is a little bit more clear now ...
Thank's in advance,
Joel.
No it isn't: setting the scales is done by QwtPlot::setAxisScale. QwtPlotMagnifier changes these scales according to wheel events and the current scale ranges ( calling QwtPlot::setAxisScale() ). QwtPlotZoomer does it similar - beside, that it has a history ( zoomStack ), where you can step back/forward,
But what do you expect from an initial state of a magnifier ?
Uwe
Hi Uwe,
Thanks for you reply.
What I would expect from an initial state of a magnifier would be that all the entity attached to the QwtPlot are displayed.
Actually, the initial view is a full zoom on one curve ... but maybe it's not the normal behavior and there is somethig wrong in my code !!
I will see if I can compute a scale factor to apply using QwtPlot::setAxisScale() so that I can ensure that my bounding box is shown in the QwtPlot ...
Best regards,
Joel.
jomarin (6th May 2010)
Thanks Uwe,
I did not understand why I did not get all my entities displayed when enabling autoscaling, but using :
setAxisScale(QwtPlot::xBottom,minZoomRect.left(),m inZoomRect.right());
setAxisScale(QwtPlot::yLeft,minZoomRect.bottom(),m inZoomRect.top());
It works perfect for me
Bookmarks