mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4571 Sum. cmd. line: Add support for -s, -n and -e to grid cell plotting
This commit is contained in:
committed by
Gaute Lindkvist
parent
889577400a
commit
11e73a76fc
@@ -214,6 +214,22 @@ std::vector<double> RimGridTimeHistoryCurve::yValues() const
|
||||
}
|
||||
}
|
||||
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
firstAncestorOrThisOfTypeAsserted(plot);
|
||||
bool isNormalized = plot->isNormalizationEnabled();
|
||||
if (isNormalized)
|
||||
{
|
||||
auto minMaxPair = std::minmax_element(values.begin(), values.end());
|
||||
double min = *minMaxPair.first;
|
||||
double max = *minMaxPair.second;
|
||||
double range = max - min;
|
||||
|
||||
for (double & v: values)
|
||||
{
|
||||
v = (v - min)/range;
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user