Skip to content

Commit

Permalink
OPM#11696 Make sure PC axis is visible when required
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Sep 14, 2024
1 parent d8b8c86 commit 16900d5
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,9 @@ void RiuRelativePermeabilityPlotPanel::plotCurvesInQwt( RiaDefines::EclipseUnitS

if ( plotOnWhichYAxis == RIGHT_YAXIS )
{
qwtCurve->setYAxis( RiuPlotAxis::defaultRight() );
QwtAxisId relatedYAxis( QwtAxis::YRight, 0 );

qwtCurve->QwtPlotCurve::setYAxis( relatedYAxis );
shouldEnableRightYAxis = true;
}

Expand Down Expand Up @@ -432,9 +434,15 @@ void RiuRelativePermeabilityPlotPanel::plotCurvesInQwt( RiaDefines::EclipseUnitS
}

if ( shouldEnableRightYAxis )
{
plot->setAxesCount( QwtAxis::YRight, 1 );
plot->setAxisVisible( QwtAxis::YRight, true );
}
else
{
plot->setAxesCount( QwtAxis::YRight, 0 );
plot->setAxisVisible( QwtAxis::YRight, false );
}

addTransparentCurve( plot, points, axes, logScaleLeftAxis );

Expand Down

0 comments on commit 16900d5

Please sign in to comment.