0
我子類QwtPlot
喜歡:QwtPlot setAxisScale,它是如何工作的?
class RealPlot : public QwtPlot {
public:
RealPlot() {
...
setAxisScale(QwtPlot::xBottom, -5, 5);
}
void addPoint(Point p) {
...
setAxisScale(QwtPlot::xBottom, min, max);
}
}
而且我想每次添加一個新的起點的時間來重新調整(水平軸)的情節。因此,在將點添加到曲線後,我將其稱爲setAxisScale(QwtPlot::xBottom, min, max);
。
問題在於該圖不會被重新調整。在構造函數中調用setAxisScale(QwtPlot::xBottom, -5, 5);
確實會重繪該圖。但是setAxisScale(QwtPlot::xBottom, min, max);
沒有。爲什麼?