Все просто, но без телепатии не получается...
/*-----------------------InvertScaleTransformation-----------------------*/
class InvertScaleTransformation : public QwtScaleTransformation
{
public:
InvertScaleTransformation() : QwtScaleTransformation(QwtScaleTransformation::Other) {}
~InvertScaleTransformation() {}
double xForm(double s, double s1, double s2, double p1, double p2) const
{
return p1 + (p2 - p1) / (s2 - s1) * (s2 - s - s1);
}
double invXForm(double p, double p1, double p2, double s1, double s2) const
{
return s2 - s1 + (s2 - s1) / (p2 - p1) * (p - p1);
}
QwtScaleTransformation *copy() const
{
return new InvertScaleTransformation();
}
};
/*-----------------------InvertScaleEngine-----------------------*/
class InvertScaleEngine : public QwtLinearScaleEngine
{
public:
InvertScaleEngine() : QwtLinearScaleEngine() {}
~InvertScaleEngine() {}
QwtScaleTransformation* transformation() const
{
return new InvertScaleTransformation();
}
};
...
plot->setAxisScaleEngine(QwtPlot::yLeft, new InvertScaleEngine());