PDA

View Full Version : QwtPlotZoomer, using two zoomers.



jma
29th September 2008, 09:49
Hi,
This is my first post here, thank you for a great library.
I am a beginner in Qt (4.3.3) and Qwt (5.0.1) so please have patience if asking the obvious.

I plot a curve using QwtPlot, now I have both xTop and xBottom enabled and they show different scales. I added two zoomers, one bound to yLeft, xTop and the other yLeft, xBottom axises. Now it seems that the QwtDoubleRect does not contain the values I would expect. For example if zooming say 200 units wide and 100 units tall portion of the screen, the rect.yp points to 50 and rect.h is 25. If bounding the second zoomer to yRight instead everything works fine. Why does the zoomers work like that when bound to the same axis, or have I misunderstood something here?

Thank you for advice,
Jarkko

Uwe
30th September 2008, 00:23
You can have only one zoomer for each axis. So one zoomer for yLeft/xBottom and another one for yRight/xTop is o.k - even if you have only 3 axis ( like in the bode example )

Uwe

jma
30th September 2008, 09:29
Ok, thanks for a quick reply. What I was trying to accomplish was having xTop and xBottom zoomed "together" so that the scales shown were zoomed in sync with each other. The solution of using both yLeft and yRight is ok.
Jarkko