diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.cpp index 29692a465d..abcc9733e2 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.cpp @@ -134,9 +134,14 @@ void RimWellFlowRateCurve::updateCurveAppearance() //-------------------------------------------------------------------------------------------------- void RimWellFlowRateCurve::updateStackedPlotData() { + RimWellLogPlot* wellLogPlot; + firstAncestorOrThisOfType(wellLogPlot); + RimWellLogTrack* wellLogTrack; firstAncestorOrThisOfType(wellLogTrack); + bool isFirstTrack = (wellLogTrack == wellLogPlot->trackByIndex(0)); + RimDefines::DepthUnitType displayUnit = RimDefines::UNIT_METER; std::vector depthValues = m_curveData->measuredDepthPlotValues(displayUnit); @@ -156,12 +161,18 @@ void RimWellFlowRateCurve::updateStackedPlotData() if ( stCurve == this ) break; zPos -= 1.0; } + + // Add a dummy point for the zeroth connection to make the "end" distribution show better. + + stackedValues.push_back(stackedValues.back()); + depthValues.push_back(0.0); + std::vector< std::pair > polyLineStartStopIndices = m_curveData->polylineStartStopIndices(); + + if ( isFirstTrack ) polyLineStartStopIndices.front().second += 2; + else polyLineStartStopIndices.front().second += 1; m_qwtPlotCurve->setSamples(stackedValues.data(), depthValues.data(), static_cast(depthValues.size())); - - std::vector< std::pair > polyLineStartStopIndices = m_curveData->polylineStartStopIndices(); - polyLineStartStopIndices.front().second += 1; m_qwtPlotCurve->setLineSegmentStartStopIndices(polyLineStartStopIndices); m_qwtPlotCurve->setZ(zPos);