@@ -1228,6 +1228,7 @@ Int_t TPad::DistancetoPrimitive(Int_t px, Int_t py)
12281228// / - xmargin is the space along x between pads in percent of canvas.
12291229// / - ymargin is the space along y between pads in percent of canvas.
12301230// / - color is the color of the new pads. If 0, color is the canvas color.
1231+ // / - The outer margins of the pads are taken from the current canvas margins.
12311232// /
12321233// / Pads are automatically named `canvasname_n` where `n` is the division number
12331234// / starting from top left pad.
@@ -1236,6 +1237,18 @@ Int_t TPad::DistancetoPrimitive(Int_t px, Int_t py)
12361237// /
12371238// / \image html gpad_pad3.png
12381239// /
1240+ // / Example if:
1241+ // / /// ~~~ {.cpp}
1242+ // / c->SetLeftMargin(0.30);
1243+ // / c->SetBottomMargin(0.10);
1244+ // / c->SetRightMargin(0.05);
1245+ // / c->SetTopMargin(0.10);
1246+ // / c->Divide(nx, ny, 0.03, 0.05, 46);
1247+ // / ~~~
1248+ // / \image html canvas_divide_custom.png
1249+ // /
1250+ // / More examples are in `tutorials/visualisation/graphics/canvas_divide_example.C`
1251+ // /
12391252// / Once a pad is divided into sub-pads, one can set the current pad
12401253// / to a subpad with a given division number as illustrated above
12411254// / with TPad::cd(subpad_number).
@@ -1254,9 +1267,6 @@ Int_t TPad::DistancetoPrimitive(Int_t px, Int_t py)
12541267// / __Note3:__ in case xmargin < 0 or ymargin < 0, there is no space
12551268// / between pads. The current pad margins are recomputed to
12561269// / optimize the layout.
1257- // /
1258- // / __Note4:__ in case nx < 0 or ny < 0, there is no outer x or y margin, but
1259- // / the inner margins are equal to xmargin and ymargin, respectively.
12601270
12611271void TPad::Divide (Int_t nx, Int_t ny, Float_t xmargin, Float_t ymargin, Int_t color)
12621272{
0 commit comments