@@ -252,6 +252,7 @@ TRatioPlot::TRatioPlot(TH1* h1, TH1* h2, Option_t *optH1, Option_t *optH2, Optio
252252
253253}
254254
255+
255256// //////////////////////////////////////////////////////////////////////////////
256257// / Constructor which accepts a `THStack` and a histogram. Converts the
257258// / stack to a regular sum of its containing histograms for processing.
@@ -541,7 +542,9 @@ Float_t TRatioPlot::GetSeparationMargin()
541542// / | ---------- | ------------------------------------------------------------ |
542543// / | grid / nogrid | enable (default) or disable drawing of dashed lines on lower plot |
543544// / | hideup | hides the first label of the upper axis if there is not enough space |
545+ // / | fhideup | always hides the first label of the upper axis |
544546// / | hidelow | hides the last label of the lower axis if there is not enough space |
547+ // / | fhidelow | always hides the last label of the lower axis |
545548// / | nohide | does not hide a label if there is not enough space |
546549// / | noconfint | does not draw the confidence interval bands in the fit residual case |
547550// / | confint | draws the confidence interval bands in the fit residual case (default) |
@@ -567,7 +570,11 @@ void TRatioPlot::Draw(Option_t *option)
567570 fShowConfidenceIntervals = kTRUE ; // <- default
568571 }
569572
570- if (drawOpt.Contains (" hideup" )) {
573+ if (drawOpt.Contains (" fhideup" )) {
574+ fHideLabelMode = TRatioPlot::HideLabelMode::kForceHideUp ;
575+ } else if (drawOpt.Contains (" fhidelow" )) {
576+ fHideLabelMode = TRatioPlot::HideLabelMode::kForceHideLow ;
577+ } else if (drawOpt.Contains (" hideup" )) {
571578 fHideLabelMode = TRatioPlot::HideLabelMode::kHideUp ;
572579 } else if (drawOpt.Contains (" hidelow" )) {
573580 fHideLabelMode = TRatioPlot::HideLabelMode::kHideLow ;
@@ -1304,9 +1311,16 @@ void TRatioPlot::CreateVisualAxes()
13041311 Double_t ticksize = fUpperGYaxis ->GetTickSize ()*ratio;
13051312 fLowerGYaxis ->SetTickSize (ticksize);
13061313
1307- // hide first label of upper y axis
13081314
1309- if (GetSeparationMargin () < 0.025 ) {
1315+ if (fHideLabelMode == TRatioPlot::HideLabelMode::kForceHideUp ) {
1316+
1317+ fUpperGYaxis ->SetLabelAttributes (1 , -1 , 0 );
1318+
1319+ } else if (fHideLabelMode == TRatioPlot::HideLabelMode::kForceHideLow ) {
1320+
1321+ fLowerGYaxis ->SetLabelAttributes (-1 , -1 , 0 );
1322+
1323+ } else if (GetSeparationMargin () < 0.025 ) {
13101324
13111325 if (fHideLabelMode != TRatioPlot::HideLabelMode::kNoHide ) {
13121326 if (fHideLabelMode == TRatioPlot::HideLabelMode::kHideUp ) {
0 commit comments