mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-27 08:47:00 -06:00
#4569 Summary Command Line: Add support for normalization (-n)
This commit is contained in:
parent
421cbb3e74
commit
b670f3df0d
@ -179,9 +179,10 @@ RimSummaryPlot* RicSummaryPlotFeatureImpl::createSummaryPlotFromArgumentLine(con
|
||||
"\n"
|
||||
"The summary plot options are: \n"
|
||||
" -help\t Show this help text and ignore the rest of the options.\n"
|
||||
" -nl Omit legend in plot.\n"
|
||||
" -h Include history vectors. Will be read from the summary file if the vectors exist.\n"
|
||||
" Only history vectors from the first summary case in the project will be included.\n"
|
||||
" -nl\t Omit legend in plot.\n"
|
||||
" -h\t Include history vectors. Will be read from the summary file if the vectors exist.\n"
|
||||
" \t Only history vectors from the first summary case in the project will be included.\n"
|
||||
" -n\t Scale all curves into the range 0.0-1.0."
|
||||
);
|
||||
return nullptr;
|
||||
}
|
||||
@ -214,6 +215,7 @@ RimSummaryPlot* RicSummaryPlotFeatureImpl::createSummaryPlotFromArgumentLine(con
|
||||
}
|
||||
bool hideLegend = options.contains("-nl");
|
||||
bool addHistoryCurves = options.contains("-h");
|
||||
bool isNormalizedY = options.contains("-n");
|
||||
|
||||
std::vector<RimSummaryCase*> summaryCasesToUse = RiaApplication::instance()->project()->allSummaryCases();
|
||||
|
||||
@ -228,10 +230,8 @@ RimSummaryPlot* RicSummaryPlotFeatureImpl::createSummaryPlotFromArgumentLine(con
|
||||
addHistoryCurves = false;
|
||||
}
|
||||
|
||||
if (hideLegend)
|
||||
{
|
||||
newPlot->showLegend(false);
|
||||
}
|
||||
newPlot->showLegend(!hideLegend);
|
||||
newPlot->setNormalizationEnabled(isNormalizedY);
|
||||
|
||||
newPlot->applyDefaultCurveAppearances();
|
||||
newPlot->loadDataAndUpdate();
|
||||
|
@ -638,6 +638,14 @@ bool RimSummaryPlot::applyFontSize(RiaDefines::FontSettingType fontSettingType,
|
||||
return anyChange;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::setNormalizationEnabled(bool enable)
|
||||
{
|
||||
m_normalizeCurveYValues = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -140,6 +140,7 @@ public:
|
||||
bool hasCustomFontSizes(RiaDefines::FontSettingType fontSettingType, int defaultFontSize) const override;
|
||||
bool applyFontSize(RiaDefines::FontSettingType fontSettingType, int oldFontSize, int fontSize, bool forceChange = false) override;
|
||||
|
||||
void setNormalizationEnabled(bool enable);
|
||||
bool isNormalizationEnabled();
|
||||
void showLegend(bool enable);
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user