mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
#14524 Histogram: Auto-select logarithmic binning and show filter info text
Select logarithmic binning and a logarithmic x-axis automatically when creating a grid statistics histogram plot from a 3D view showing a logarithmic result (RiaResultNames::isLogarithmicResult). Show a plot info label at the top right of the plot canvas describing active data filters: "Filter: Visible cells in 3D view" when a cell filter view is set, and "Filter: User defined x-range [min..max]" when the bin range is user-defined. The label collects unique filter descriptions from the data sources of all visible curves and is removed when no filters are active.
This commit is contained in:
1 parent
508804d6ab
commit
6c2c13770e
7 files changed
+136
-3
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Histogram/RimGridStatisticsHistogramDataSource.h"
|
||||
#include "Histogram/RimHistogramDataSource.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -224,3 +225,21 @@ TEST( RimHistogramDataSourceTest, ComputeBinRange )
|
||||
EXPECT_DOUBLE_EQ( 6.0, max );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RimHistogramDataSourceTest, UserDefinedRangeFilterText )
|
||||
{
|
||||
EXPECT_EQ( "Filter: User defined x-range [0.1..100]", RimHistogramDataSource::userDefinedRangeFilterText( 0.1, 100.0 ).toStdString() );
|
||||
EXPECT_EQ( "Filter: User defined x-range [-2.5..0]", RimHistogramDataSource::userDefinedRangeFilterText( -2.5, 0.0 ).toStdString() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RimHistogramDataSourceTest, FilterDescriptionsDefaultIsEmpty )
|
||||
{
|
||||
RimGridStatisticsHistogramDataSource dataSource;
|
||||
EXPECT_TRUE( dataSource.filterDescriptions().empty() );
|
||||
}
|
||||
Reference in new issue
Block a user