Commit Graph
6 Commits
Author SHA1 Message Date
Kristian Bendiksen 05588f4327 #14524 Histogram: Reset user-defined bin range on property change
A user-defined bin range is tied to the value range of a specific result: a
range set up for FLUXNUM does not apply to PERMX. Reset the bin range mode to
Automatic and the min/max cutoffs to their defaults when another property is
selected, and reset the stale cutoffs when the user sets the bin range mode
back to Automatic.
2026-08-19 12:23:07 +02:00
Kristian Bendiksen 5f465bf19a #14524 Histogram: Set linear binning when selecting a non-logarithmic property
Make the property-driven binning mode symmetric: selecting a non-logarithmic
result (e.g. FLUXNUM) after a logarithmic one (e.g. PERMX) sets the binning mode
and x-axis back to linear.

Replace the one-way logarithmicBinningEnabled signal with a binningModeChanged
signal carrying the new mode, so the x-axis scale follows the binning mode in
both directions, also when the binning mode itself is changed in the UI.
2026-08-19 12:23:07 +02:00
Kristian Bendiksen aaaf5689aa #14524 Histogram: Enable logarithmic binning when selecting a logarithmic property
Selecting a logarithmic result manually in the grid statistics data source
property editor now enables logarithmic binning and a logarithmic x-axis, the
same as creating the plot from a 3D view.

The previously selected result variable is tracked so that only an actual
property change enables logarithmic binning: other property edits leave a
user-selected binning mode alone, and binning modes stored in project files are
kept as-is on load.
2026-08-19 12:23:07 +02:00
Kristian Bendiksen 6c2c13770e #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.
2026-08-19 12:23:07 +02:00
Kristian Bendiksen d96159fb7c #7750 Histogram Plot: Add logarithmic binning and user-defined bin range
Add BinningMode (Linear/Logarithmic) and OutOfRangeHandling (Exclude/Include in
Boundary Bins) to RigHistogramCalculator, with defaulted constructor arguments so
existing callers are unaffected. All four histogram plot data sources get shared
options for binning mode and an optional user-defined bin range through new PDM
fields on RimHistogramDataSource.

The grid statistics data source computes non-default histograms through a new
non-caching RigStatisticsDataCache::computeHistogram() pass-through, leaving the
cached statistics used by the 3D overlay and the P10/P90/mean annotation lines
untouched.

Selecting logarithmic binning enables logarithmic scale on the plot X axis once,
via a new signal handled by RimHistogramCurve.

Also fix the bin index computation to use uniform bins of width range/nBins,
consistent with calculatePercentil() and the bin edges drawn by the plots. The
previous divisor (nBins - 1) shifted counts by up to one bin width relative to
the drawn bars and slightly biased histogram-based percentile estimates.
2026-08-13 07:19:18 +02:00
Kristian Bendiksen 280763f4c0 #14203 Add cumulative curve option to Grid Statistics plot
A new "Show Cumulative Curve" checkbox on the grid statistics data source adds a cumulative curve on the right axis, in addition to the regular histogram curve. The cumulative curve shares the data source of its non-cumulative counterpart and follows all changes to it. The cumulative sum works with all frequency types and both graph types.

Remove the legacy Grid Statistics dialog (RicGridStatisticsDialog) and its context menu command, which provided the previous cumulative display.
2026-07-27 12:37:59 +02:00