Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions graf2d/gpad/src/TPad.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ Int_t TPad::DistancetoPrimitive(Int_t px, Int_t py)
/// points to the current pad. One can use gPad to set attributes
/// of the current pad.
///
/// __Note3:__ in case xmargin <=0 and ymargin <= 0, there is no space
/// __Note3:__ in case xmargin < 0 and ymargin < 0, there is no space
/// between pads. The current pad margins are recomputed to
/// optimize the layout.

Expand All @@ -1277,7 +1277,7 @@ void TPad::Divide(Int_t nx, Int_t ny, Float_t xmargin, Float_t ymargin, Int_t co
TString name, title;
Int_t n = 0;
if (color == 0) color = GetFillColor();
if (xmargin > 0 && ymargin > 0) {
if (xmargin >= 0 && ymargin >= 0) {
//general case
dy = 1/Double_t(ny);
dx = 1/Double_t(nx);
Expand All @@ -1298,7 +1298,7 @@ void TPad::Divide(Int_t nx, Int_t ny, Float_t xmargin, Float_t ymargin, Int_t co
}
}
} else {
// special case when xmargin <= 0 && ymargin <= 0
// special case when xmargin < 0 && ymargin < 0
Double_t xl = GetLeftMargin();
Double_t xr = GetRightMargin();
Double_t yb = GetBottomMargin();
Expand Down Expand Up @@ -1327,7 +1327,7 @@ void TPad::Divide(Int_t nx, Int_t ny, Float_t xmargin, Float_t ymargin, Int_t co
if (j == ny-1) y1 = 0;
name.Form("%s_%d", GetName(), number);
title.Form("%s_%d", GetTitle(), number);
pad = new TPad(name.Data(), title.Data(), x1, y1, x2, y2);
pad = new TPad(name.Data(), title.Data(), x1, y1, x2, y2, color);
pad->SetNumber(number);
pad->SetBorderMode(0);
if (i == 0) pad->SetLeftMargin(xl*nx);
Expand Down
Loading