QwtPlot::axisScaleDiv() returns the range of the scale, but as the scale division is calculated in the replot operation you probably tried too early. You can force a recalculation of the scales by calling QwtPlot::updateAxes() - but doing so is usually an indication of doing something wrong.
- You can connect to the QwtScaleWidget::scaleDivChanged() signal when you need to know when a scale is changing.
- Also be aware of the QwtPlotItem::ScaleInterest flag, that can be enabled for a plot item that needs to be adjusted to the scale ( like for example the grid ).
- Another hook is QwtSeriesData::setRectOfInterest().
But without knowing your use case I can't tell what API is the best one for you.
Uwe
Bookmarks