
Originally Posted by
Uwe
And how is your scale item connected to which scale engine ?
Uwe
Like this:
// This code is taken from your example code in the documention of QwtPlotScaleItem
scaleItem
->setFont
(plot
->axisWidget
(QwtPlot::xBottom)->font
());
// This is the customized part
scaleItem
->setXAxis
(QwtPlot::xBottom);
scaleItem->setScaleDivFromAxis(true);
// This is from your documentation again
scaleItem->attach(plot);
// This code is taken from your example code in the documention of QwtPlotScaleItem
auto scaleItem = new QwtPlotScaleItem(QwtScaleDraw::TopScale, 0.0);
scaleItem->setFont(plot->axisWidget(QwtPlot::xBottom)->font());
// This is the customized part
scaleItem->setXAxis(QwtPlot::xBottom);
scaleItem->setScaleDivFromAxis(true);
// This is from your documentation again
scaleItem->attach(plot);
To copy to clipboard, switch view to plain text mode
According to your documentation the setSCaleDivFromAxis method synchronizes the scale item with the corresponding axis. Am I missing anything?
Bookmarks