HappyCoder
5th August 2015, 12:41
Hi,
i calculate the max, min values over all attached curves of a plot
QwtPlotItemList curveList = plot()->itemList( QwtPlotItem::Rtti_PlotCurve );
for ( int i = 0; i < curveList.size(); i++ )
{
QwtPlotCurve *curve = static_cast<QwtPlotCurve *>( curveList[i] );
d_data->maxLimitX = qMax( d_data->maxLimitX, curve->maxXValue() );
d_data->minLimitX = qMin( d_data->minLimitX, curve->minXValue() );
d_data->maxLimitY = qMax( d_data->maxLimitY, curve->maxYValue() );
d_data->minLimitY = qMin( d_data->minLimitY, curve->minYValue() );
}
Does QwtPlot provide an integrated function to get the same? I didn't found any.
Thx
Stefan
i calculate the max, min values over all attached curves of a plot
QwtPlotItemList curveList = plot()->itemList( QwtPlotItem::Rtti_PlotCurve );
for ( int i = 0; i < curveList.size(); i++ )
{
QwtPlotCurve *curve = static_cast<QwtPlotCurve *>( curveList[i] );
d_data->maxLimitX = qMax( d_data->maxLimitX, curve->maxXValue() );
d_data->minLimitX = qMin( d_data->minLimitX, curve->minXValue() );
d_data->maxLimitY = qMax( d_data->maxLimitY, curve->maxYValue() );
d_data->minLimitY = qMin( d_data->minLimitY, curve->minYValue() );
}
Does QwtPlot provide an integrated function to get the same? I didn't found any.
Thx
Stefan