mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 14:40:26 -05:00
Histogram Plot: add P10, mean and P90.
This commit is contained in:
1 parent
48f1597953
commit
b46e55bc21
9 files changed
+117
-80
No files matched your search
+11
-13
@@ -156,27 +156,25 @@ std::string RimGridStatisticsHistogramDataSource::unitNameX() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RimGridStatisticsHistogramDataSource::valuesX( RimHistogramPlot::GraphType graphType ) const
|
||||
RimHistogramDataSource::HistogramResult RimGridStatisticsHistogramDataSource::compute( RimHistogramPlot::GraphType graphType,
|
||||
RimHistogramPlot::FrequencyType frequencyType ) const
|
||||
{
|
||||
RimHistogramDataSource::HistogramResult result;
|
||||
|
||||
RigHistogramData histogramData = createStatisticsData();
|
||||
if ( !histogramData.isHistogramVectorValid() ) return {};
|
||||
if ( !histogramData.isHistogramVectorValid() ) return result;
|
||||
|
||||
double min = histogramData.min;
|
||||
double max = histogramData.max;
|
||||
|
||||
return computeHistogramBins( min, max, m_numBins, graphType );
|
||||
}
|
||||
result.valuesX = computeHistogramBins( min, max, m_numBins, graphType );
|
||||
result.valuesY = computeHistogramFrequencies( histogramData.histogram, graphType, frequencyType );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RimGridStatisticsHistogramDataSource::valuesY( RimHistogramPlot::GraphType graphType,
|
||||
RimHistogramPlot::FrequencyType frequencyType ) const
|
||||
{
|
||||
RigHistogramData histogramData = createStatisticsData();
|
||||
if ( !histogramData.isHistogramVectorValid() ) return {};
|
||||
result.p10 = histogramData.p10;
|
||||
result.mean = histogramData.mean;
|
||||
result.p90 = histogramData.p90;
|
||||
|
||||
return computeHistogramFrequencies( histogramData.histogram, graphType, frequencyType );
|
||||
return result;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user