That's all the code I have. Isn't it supposed to read the values in the plot and do this automatically?
I added this but there's no change
qwtPlot
->setAxisScaleEngine
(QwtPlot::xBottom, scaleEngine
);
qwtPlot
->setAxisScaleEngine
(QwtPlot::yLeft, scaleEngine
);
qwtPlot
->setAxisAutoScale
(QwtPlot::xBottom);
qwtPlot
->axisScaleEngine
(QwtPlot::xBottom)->setMargins
(0,
0);
qwtPlot
->setAxisAutoScale
(QwtPlot::yLeft);
qwtPlot
->axisScaleEngine
(QwtPlot::yLeft)->setMargins
(0,
0);
QwtLinearScaleEngine *scaleEngine = new QwtLinearScaleEngine;
qwtPlot->setAxisScaleEngine(QwtPlot::xBottom, scaleEngine );
scaleEngine = new QwtLinearScaleEngine;
qwtPlot->setAxisScaleEngine(QwtPlot::yLeft, scaleEngine );
qwtPlot->axisScaleEngine(QwtPlot::xBottom)->setAttribute(QwtScaleEngine::Floating,true);
qwtPlot->axisScaleEngine(QwtPlot::yLeft)->setAttribute(QwtScaleEngine::Floating,true);
qwtPlot->setAxisAutoScale(QwtPlot::xBottom);
qwtPlot->axisScaleEngine(QwtPlot::xBottom)->setMargins(0,0);
qwtPlot->setAxisAutoScale(QwtPlot::yLeft);
qwtPlot->axisScaleEngine(QwtPlot::yLeft)->setMargins(0,0);
To copy to clipboard, switch view to plain text mode
Bookmarks