PDA

View Full Version : Auto-scaling not enabled



kulsekarr
3rd June 2014, 16:55
hi,
autoscaling is not happening in the y axis, please can anyone help me out ..

plot = new DataPlot(this);
plot->setAxisTitle(QwtPlot::xBottom, "Data");
plot->setAxisAutoScale(QwtPlot::yLeft);
plot->setAxisScale(QwtPlot::xBottom, 0,1200);
plot->setAxisScale(QwtPlot::yLeft,-500,2500);
plot->setAxisAutoScale(QwtPlot::yLeft);

can any one help me out thanks in advance..

Regard,
kulasekaran

Cah
5th June 2014, 08:38
autoscaling is not happening in the y axis, please can anyone help me out ..


plot->setAxisScale(QwtPlot::yLeft,-500,2500);
plot->setAxisAutoScale(QwtPlot::yLeft);

For a particular axis
setAxisScale() turns auto scaling off
setAxisAutoScale() turns auto scaling on

Calling setAxisScale() on a particular axis is not usually followed by a call to setAxisAutoScale(..., true) on the same axis

Nevetheless if
plot->setAxisAutoScale(QwtPlot::yLeft);
is truly the last call affecting scaling mode on the yLeft, autoscaling is enabled and the scale should adjust on the next replot()