Skip to content

Commit 78df45e

Browse files
committed
restore label if plots are separated again
1 parent 36900d4 commit 78df45e

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

graf2d/gpad/src/TRatioPlot.cxx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,16 +1320,26 @@ void TRatioPlot::CreateVisualAxes()
13201320

13211321
fLowerGYaxis->SetLabelAttributes(-1, -1, 0);
13221322

1323-
} else if (GetSeparationMargin() < 0.025) {
1323+
} else {
1324+
if (GetSeparationMargin() < 0.025) {
1325+
1326+
if (fHideLabelMode != TRatioPlot::HideLabelMode::kNoHide) {
1327+
if (fHideLabelMode == TRatioPlot::HideLabelMode::kHideUp) {
1328+
fUpperGYaxis->SetLabelAttributes(1, -1, 0);
1329+
} else if (fHideLabelMode == TRatioPlot::HideLabelMode::kHideLow) {
1330+
fLowerGYaxis->SetLabelAttributes(-1, -1, 0);
1331+
}
1332+
}
13241333

1325-
if (fHideLabelMode != TRatioPlot::HideLabelMode::kNoHide) {
1334+
} else {
1335+
// reset
13261336
if (fHideLabelMode == TRatioPlot::HideLabelMode::kHideUp) {
1327-
fUpperGYaxis->SetLabelAttributes(1, -1, 0);
1337+
fUpperGYaxis->SetLabelAttributes(0);
13281338
} else if (fHideLabelMode == TRatioPlot::HideLabelMode::kHideLow) {
1329-
fLowerGYaxis->SetLabelAttributes(-1, -1, 0);
1339+
fLowerGYaxis->SetLabelAttributes(0);
13301340
}
1331-
}
13321341

1342+
}
13331343
}
13341344

13351345
// Create the axes on the other sides of the graphs

0 commit comments

Comments
 (0)