...
const int numElements = 5;
QVector<QPointF> curve1( numElements );
QVector<QwtIntervalSample> errorbar1( numElements );
QVector<QPointF> curve2( numElements );
QVector<QwtIntervalSample> errorbar2( numElements );
for ( int i = 0; i < numElements; i++ )
{
curve1
[i
] = QPointF( double( i
),
double( pow(i,
3) ) );
errorbar1[i] = QwtIntervalSample( double( i ),
QwtInterval( pow(i,3)-i, pow(i,3)+i ));
curve2
[i
] = QPointF( double( 2*i
),
double( pow(i,
3) ) );
errorbar2[i] = QwtIntervalSample( double( 2*i ),
QwtInterval( pow(i,3)-i, pow(i,3)+i ));
}
insertCurve( "Curve 1", curve1, Qt::darkRed );
insertErrorBars( "Error-Bars 1", errorbar1, Qt::red );
insertCurve( "Curve 2", curve2, Qt::darkGreen );
insertErrorBars( "Error-Bars 2", errorbar2, Qt::green );
...
...
const int numElements = 5;
QVector<QPointF> curve1( numElements );
QVector<QwtIntervalSample> errorbar1( numElements );
QVector<QPointF> curve2( numElements );
QVector<QwtIntervalSample> errorbar2( numElements );
for ( int i = 0; i < numElements; i++ )
{
curve1[i] = QPointF( double( i ), double( pow(i,3) ) );
errorbar1[i] = QwtIntervalSample( double( i ),
QwtInterval( pow(i,3)-i, pow(i,3)+i ));
curve2[i] = QPointF( double( 2*i ), double( pow(i,3) ) );
errorbar2[i] = QwtIntervalSample( double( 2*i ),
QwtInterval( pow(i,3)-i, pow(i,3)+i ));
}
insertCurve( "Curve 1", curve1, Qt::darkRed );
insertErrorBars( "Error-Bars 1", errorbar1, Qt::red );
insertCurve( "Curve 2", curve2, Qt::darkGreen );
insertErrorBars( "Error-Bars 2", errorbar2, Qt::green );
...
To copy to clipboard, switch view to plain text mode
Bookmarks