Hi, can anyone give me a hint on how to retain a zoomed view in QwtPlot while keeping aspect ratio and resizing chart. I've been experimenting with the rescaler example in Qwt playground, but can't get it to work.
Thanks
Hi, can anyone give me a hint on how to retain a zoomed view in QwtPlot while keeping aspect ratio and resizing chart. I've been experimenting with the rescaler example in Qwt playground, but can't get it to work.
Thanks
There is no solution - when the width/height ratio of the canvas geometry changes you have to adjust the zoomed view or you lose the aspect ratio.
QwtPlotRescaler offers some standard strategies for adjusting the scales according to the canvas geometry.
But I guess you already knew this - so what exactly is your question now ( "can't get it to work" might be anything ) ?
Uwe
Thanks Uwe, I see your point. I'm not making aspect ratio adjustments to the zoomed view. I'll work on that.
But once I get that working, and I'm keeping the aspect ratio during zoom, how can I retain that zoomed view after a resize event occurs?
Right now (after a resize), the canvas always reverts back to the original, unzoomed view. Is this because, currently, my zoom views are "unadjusted" and aspect ratio has been lost?
Uwe, I think I’ve solved our aspect ratio issue for now. Rather than setting the QwtPlotRescaler rescalePolicy to “Fittingâ€, I’ve reverted back to using a rescalePolicy of “Fixedâ€.
It’s not a perfect solution for this particular implementation of QwtPlot, but it’s a lot easier to implement and it will due for now.
Thank you.
Bookmarks