
Originally Posted by
vinothrajendran
I have a scenario where i should be plotting real time data for an hour. But first i have to display only first 2 min in x axis, when time reaches 2 min i should expand my scale to 4 min and it should keep on going......
void YourPlot
::addPoint( const QPointF &pos
) {
const QwtInterval interval
= axisInterval
( QwtPlot::xBottom );
if ( pos.x() > interval.maxValue() )
{
setAxisScale( interval.minValue(), interval.maxValue() + ... );
replot();
}
...
}
void YourPlot::addPoint( const QPointF &pos )
{
const QwtInterval interval = axisInterval( QwtPlot::xBottom );
if ( pos.x() > interval.maxValue() )
{
setAxisScale( interval.minValue(), interval.maxValue() + ... );
replot();
}
...
}
To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks