Right now the two axes for my qwtPlot shows 6 labels, 0, 200, 400, 600, 800, and 1000. I want to make it show 11 instead, that is 0, 100, 200, 300, etc.
I tried this, but it doesn't work
double horizontalLowerBound=scaleDivHorizontal->lowerBound();
double horizontalUpperBound=scaleDivHorizontal->upperBound();
double verticalLowerBound=scaleDivVertical->lowerBound();
double verticalUpperBound=scaleDivVertical->upperBound();
double horizontalStepSize, verticalStepSize;
qwtPlot
->axisScaleEngine
(QwtPlot::xBottom)->autoScale
(11,horizontalLowerBound,horizontalUpperBound,horizontalStepSize
);
qwtPlot
->axisScaleEngine
(QwtPlot::yLeft)->autoScale
(11,verticalLowerBound,verticalUpperBound,verticalStepSize
);
const QwtScaleDiv *scaleDivHorizontal = qwtPlot->axisScaleDiv(QwtPlot::xBottom);
const QwtScaleDiv *scaleDivVertical = qwtPlot->axisScaleDiv(QwtPlot::yLeft);
double horizontalLowerBound=scaleDivHorizontal->lowerBound();
double horizontalUpperBound=scaleDivHorizontal->upperBound();
double verticalLowerBound=scaleDivVertical->lowerBound();
double verticalUpperBound=scaleDivVertical->upperBound();
double horizontalStepSize, verticalStepSize;
qwtPlot->axisScaleEngine(QwtPlot::xBottom)->autoScale(11,horizontalLowerBound,horizontalUpperBound,horizontalStepSize);
qwtPlot->axisScaleEngine(QwtPlot::yLeft)->autoScale(11,verticalLowerBound,verticalUpperBound,verticalStepSize);
To copy to clipboard, switch view to plain text mode
Any help would be appreciated.
Bookmarks