Hi,
I posted this question as a replay to an old post. But there was no response. So posting new thread.
I have inherited a class from QWTPlot and inside that I am calling
Qt Code:
  1. QwtPlotRescaler rescaler(canvas());
  2. rescaler.setReferenceAxis(QwtPlot::xBottom);
  3. rescaler.setAspectRatio(QwtPlot::yLeft, 1.0);
To copy to clipboard, switch view to plain text mode 
My requirement is
Initially my plot's X Y axes have same range, 0 to 1. But My data changes such that y axis range is -1 to 1 (this is only an example. The range change dynamically to -0.5 to 1.0, -0.2 to 1.5 etc ) keeping x axis range 0 to 1 and now my aspect ratio is changed which I don't want. I expected that the rescaler will make the plot rectangle of height=2*width to maintain aspect ratio. But it remains as a square and Y axis got shrunk. I need to dynamically change the Y axis range and need to maintain aspect ratio. What I need to do? I also need to maintain aspect ratio when user shrinks the parent window.