mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve legend for Correlation Plots
This commit is contained in:
parent
84177d3a00
commit
90596be3ee
@ -144,7 +144,7 @@ RimCorrelationMatrixPlot::RimCorrelationMatrixPlot()
|
||||
CAF_PDM_InitField( &m_removeRowsAndColumnsWithZeroCorrelation,
|
||||
"RemoveZeroCorrelation",
|
||||
false,
|
||||
"Remove rows/columns with zero correlation",
|
||||
"Remove uncorrelated rows/columns",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
@ -154,6 +154,7 @@ RimCorrelationMatrixPlot::RimCorrelationMatrixPlot()
|
||||
m_legendConfig->setAutomaticRanges( -1.0, 1.0, -1.0, 1.0 );
|
||||
m_legendConfig->setColorLegend( RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::CORRELATION ) );
|
||||
|
||||
this->uiCapability()->setUiTreeChildrenHidden( true );
|
||||
m_selectMultipleVectors = true;
|
||||
}
|
||||
|
||||
@ -249,6 +250,7 @@ void RimCorrelationMatrixPlot::defineUiOrdering( QString uiConfigName, caf::PdmU
|
||||
plotGroup->add( &m_labelFontSize );
|
||||
plotGroup->add( &m_axisTitleFontSize );
|
||||
plotGroup->add( &m_axisValueFontSize );
|
||||
m_legendConfig->uiOrdering( "ColorsOnly", *plotGroup );
|
||||
}
|
||||
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
@ -303,16 +305,6 @@ void RimCorrelationMatrixPlot::childFieldChangedByUi( const caf::PdmFieldHandle*
|
||||
this->loadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCorrelationMatrixPlot::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||
QString uiConfigName /*= "" */ )
|
||||
{
|
||||
uiTreeOrdering.add( m_legendConfig() );
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -573,7 +565,7 @@ void RimCorrelationMatrixPlot::updatePlotTitle()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCorrelationMatrixPlot::updateLegend()
|
||||
{
|
||||
if ( m_plotWidget ) m_plotWidget->updateLegend();
|
||||
if ( m_legendConfig ) m_legendConfig->recreateLegend();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -64,7 +64,6 @@ private:
|
||||
void onLoadDataAndUpdate() override;
|
||||
|
||||
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
|
||||
void updateAxes() override;
|
||||
|
||||
|
@ -77,11 +77,15 @@ RimCorrelationReportPlot::RimCorrelationReportPlot()
|
||||
m_correlationMatrixPlot->setLegendsVisible( false );
|
||||
m_correlationMatrixPlot->setColSpan( RimPlot::TWO );
|
||||
m_correlationMatrixPlot->setRowSpan( RimPlot::TWO );
|
||||
|
||||
m_correlationPlot = new RimCorrelationPlot;
|
||||
m_correlationPlot->setLegendsVisible( false );
|
||||
|
||||
m_parameterResultCrossPlot = new RimParameterResultCrossPlot;
|
||||
m_parameterResultCrossPlot->setLegendsVisible( false );
|
||||
|
||||
this->uiCapability()->setUiTreeChildrenHidden( true );
|
||||
|
||||
this->connect( m_correlationMatrixPlot(),
|
||||
SIGNAL( matrixCellSelected( const EnsembleParameter&, const RiaSummaryCurveDefinition& ) ),
|
||||
SLOT( onDataSelection( const EnsembleParameter&, const RiaSummaryCurveDefinition& ) ) );
|
||||
@ -336,19 +340,10 @@ void RimCorrelationReportPlot::defineUiOrdering( QString uiConfigName, caf::PdmU
|
||||
plotGroup->add( &m_labelFontSize );
|
||||
plotGroup->add( &m_axisTitleFontSize );
|
||||
plotGroup->add( &m_axisValueFontSize );
|
||||
m_correlationMatrixPlot->legendConfig()->uiOrdering( "ColorsOnly", *plotGroup );
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCorrelationReportPlot::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||
QString uiConfigName /*= "" */ )
|
||||
{
|
||||
uiTreeOrdering.add( m_correlationMatrixPlot->legendConfig() );
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -72,7 +72,6 @@ private:
|
||||
void deleteViewWidget() override;
|
||||
void onLoadDataAndUpdate() override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
|
||||
void doUpdateLayout() override;
|
||||
|
@ -978,6 +978,11 @@ void RimRegularLegendConfig::defineUiOrdering( QString uiConfigName, caf::PdmUiO
|
||||
uiOrdering.add( &m_numLevels );
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
else if ( uiConfigName == "ColorsOnly" )
|
||||
{
|
||||
uiOrdering.add( &m_colorLegend );
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
caf::PdmUiOrdering* formatGr = uiOrdering.addNewGroup( "Format" );
|
||||
|
Loading…
Reference in New Issue
Block a user