mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Error bars. Plot only valid error bar values
This commit is contained in:
parent
34f61b92c0
commit
76d3ec79fd
@ -28,6 +28,11 @@
|
||||
#include "qwt_scale_map.h"
|
||||
#include "qwt_interval_symbol.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Internal constants
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
#define DOUBLE_INF std::numeric_limits<double>::infinity()
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -93,7 +98,7 @@ void RiuLineSegmentQwtPlotCurve::setSamplesFromXValuesAndYValues(const std::vect
|
||||
{
|
||||
points << QPointF(filteredXValues[i], filteredYValues[i]);
|
||||
|
||||
if (showErrorBars)
|
||||
if (showErrorBars && filteredYValues[i] != DOUBLE_INF && filteredYErrorValues[i] != DOUBLE_INF)
|
||||
{
|
||||
errorIntervals << QwtIntervalSample(filteredXValues[i], filteredYValues[i] - filteredYErrorValues[i], filteredYValues[i] + filteredYErrorValues[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user