mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Set default tick marks to min/max for StimPlan model plots (#8221)
Closes #8087
This commit is contained in:
@@ -422,6 +422,8 @@ void RicNewStimPlanModelPlotFeature::createParametersTrack( RimStimPlanModelPlot
|
||||
plotTrack->setShowRegionLabels( true );
|
||||
plotTrack->setLogarithmicScale( isPlotLogarithmic );
|
||||
plotTrack->setAutoScaleXEnabled( true );
|
||||
plotTrack->setMinAndMaxTicksOnly( useMinMaxTicksOnly( propertyTypes[0] ) );
|
||||
|
||||
plotTrack->updateConnectedEditors();
|
||||
plot->updateConnectedEditors();
|
||||
|
||||
@@ -627,3 +629,18 @@ RimPlot::RowOrColSpan RicNewStimPlanModelPlotFeature::defaultColSpan( RiaDefines
|
||||
|
||||
return RimPlot::ONE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewStimPlanModelPlotFeature::useMinMaxTicksOnly( RiaDefines::CurveProperty property )
|
||||
{
|
||||
std::set<RiaDefines::CurveProperty> useMajorAndMinorTickmarks = { RiaDefines::CurveProperty::STRESS,
|
||||
RiaDefines::CurveProperty::INITIAL_STRESS,
|
||||
RiaDefines::CurveProperty::PRESSURE,
|
||||
RiaDefines::CurveProperty::INITIAL_PRESSURE };
|
||||
|
||||
if ( useMajorAndMinorTickmarks.count( property ) ) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -76,4 +76,5 @@ private:
|
||||
static RimPlotCurveAppearance::FillStyle defaultFillStyle( RiaDefines::CurveProperty property );
|
||||
static RiuQwtPlotCurveDefines::LineStyleEnum defaultLineStyle( RiaDefines::CurveProperty property );
|
||||
static RimPlot::RowOrColSpan defaultColSpan( RiaDefines::CurveProperty property );
|
||||
static bool useMinMaxTicksOnly( RiaDefines::CurveProperty property );
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user