PDA

View Full Version : the relationship among the QwtLinearScaleEngine,QwtLogScaleEngine,QwtTransfor m



cp
12th September 2013, 09:45
hi,
I have some questions about the QwtLinearScaleEngine,QwtLogScaleEngine,QwtTransfor m.I don't the relationship among those class clearly.I show some code to describe my question.
Fist code :

QwtLinearScaleEngine *logSE=new QwtLinearScaleEngine();
logSE->setTransformation(new QwtLogTransform());
plot->setAxisScaleEngine(QwtPlot::xTop,logSE);

second code:

QwtLogScaleEngine *logSE=new QwtLogScaleEngine();
plot->setAxisScaleEngine(QwtPlot::xTop,logSE);

why are the results different?what is the difference between the two methods?I don't understand.
Thanks in advance!

Uwe
13th September 2013, 08:30
why are the results different?what is the difference between the two methods?
Because you have used 2 different scale engines - if they would do the same, there wouldn't be 2 of them.
Beside being a silly container for the transformation ( = mapping between plot and paint device coordinates ) a scale engine is responsible for autoscaling and calculating the tick positions.

Uwe