PDA

View Full Version : Scaling Issue



cnbp173
19th February 2009, 02:28
Ok, so I think I'm having a blond moment.

If I have a plot with multiple curves, how can I autoscale the Y axis for each curve?

I have linked up a right click event to return the selected curve, but I then want to rescale the plot to this curve data.

This is because each curve has wildly different Y values, so one has y-values between -1e-8 and 2e-8 and another one might be -10 to 10.

I've tried grabbing the boundingRect() of the Curve and then reseting the ZoomBase, but I don't think this is a great option.

Any help appreciated.

Cheers

Uwe
19th February 2009, 07:13
const QwtDoubleRect br = curve->boundingRec();
plot->setAxisScale(curve->yAxis(), br->top(), br->bottom());

Uwe