PDA

View Full Version : Y axis not auto scaling



pkj
12th May 2011, 16:05
I wanted to have a graph with x axis as date time. So I took cue from cpu plot example and subclass QwtScaleDraw in pretty much the same way.
After I QwtPlot::setAxisScaleDraw() xbottom with the new subclass, the Y axis doesn't scale. It shows 1 to 1000 i.e. the default.
I roamed around this thread a little and found QwtPlot::setAxisScale disables auto scaling. Not knowing if it is called implicitly I used QwtPlot::setAxisAutoScale(yleft) before replot() but y axis still shows the default 1 to 1000.
What am i doing wrong??

Added after 18 minutes:

Ok Ok .. My Bad... I was deserializing from file... somehow while creating the object again i attached all the curves to the right y axis... Oops...:eek: