mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 16:32:12 -05:00
Well Log Plot: Make sure curves with constant property value is visible
This commit is contained in:
1 parent
0eb0101390
commit
f1139f5f14
1 file changed
+13
@@ -2159,6 +2159,19 @@ std::pair<double, double> RimWellLogTrack::extendMinMaxRange( double minValue, d
|
||||
auto modifiedMax = maxValue;
|
||||
|
||||
auto range = std::fabs( maxValue - minValue );
|
||||
if ( range < 1e-6 )
|
||||
{
|
||||
// If min and max are equal, the curve is not visible. Make sure the range is larger than zero.
|
||||
if ( maxValue != 0.0 )
|
||||
{
|
||||
range = maxValue * 0.01;
|
||||
}
|
||||
else
|
||||
{
|
||||
range = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
modifiedMax += factor * range;
|
||||
|
||||
auto candidateMinValue = minValue - factor * range;
|
||||
|
||||
Reference in new issue
Block a user