Skip to content

Commit 5834444

Browse files
ferdymercurylinev
authored andcommitted
[graf2d] allow zero-margins between pads
Fixes #20138
1 parent a5d2f7c commit 5834444

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graf2d/gpad/src/TPad.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ Int_t TPad::DistancetoPrimitive(Int_t px, Int_t py)
12511251
/// points to the current pad. One can use gPad to set attributes
12521252
/// of the current pad.
12531253
///
1254-
/// __Note3:__ in case xmargin <=0 and ymargin <= 0, there is no space
1254+
/// __Note3:__ in case xmargin < 0 and ymargin < 0, there is no space
12551255
/// between pads. The current pad margins are recomputed to
12561256
/// optimize the layout.
12571257

@@ -1277,7 +1277,7 @@ void TPad::Divide(Int_t nx, Int_t ny, Float_t xmargin, Float_t ymargin, Int_t co
12771277
TString name, title;
12781278
Int_t n = 0;
12791279
if (color == 0) color = GetFillColor();
1280-
if (xmargin > 0 && ymargin > 0) {
1280+
if (xmargin >= 0 && ymargin >= 0) {
12811281
//general case
12821282
dy = 1/Double_t(ny);
12831283
dx = 1/Double_t(nx);
@@ -1298,7 +1298,7 @@ void TPad::Divide(Int_t nx, Int_t ny, Float_t xmargin, Float_t ymargin, Int_t co
12981298
}
12991299
}
13001300
} else {
1301-
// special case when xmargin <= 0 && ymargin <= 0
1301+
// special case when xmargin < 0 && ymargin < 0
13021302
Double_t xl = GetLeftMargin();
13031303
Double_t xr = GetRightMargin();
13041304
Double_t yb = GetBottomMargin();

0 commit comments

Comments
 (0)