I'm building a real-time plot that updates a few times a second and shows a particular window of data (usually the end of the plot) specified by an X-value range (usually from Last-N to Last). My initial approach was to iterate through each of the Curves (for which there are up to 25) and calculate the plot's boundingRect before each replot.

After reading some posts on the forum, I decided a better approach would be to simply use setAxisScale on the QwtPlot for the x-axis and hopefully the QwtPlot would be smart enough to properly scale the Y-Axis to fit the data. While the x-axis scale looks correct, the y-axis is always set to the min/max of my whole dataset and is not restricted to just the data within the custom x-axis bounds.

Am I missing something?

My code is basically:

setAxisScale(xButtom, 0.0, 200.0, 0);
setAxisAutoScale(yLeft);


Any help on this is appreciated.