Divide ()

Hi, i wrote the macro in the attachment to plot more grapfhs in one canvas, it works, but as you can see some numbers are covered by the pads,

i tried to change




but it just resize the plots, but numbers are still covered…how can I resolve?

profilopianomultipad.c (3.72 KB)

Right after every “Draw”, execute:

  gPad->Modified(); gPad->Update();
  TPaveStats *st = ((TPaveStats *)(gPad->GetPrimitive("stats")));
  if (st) {
    st->SetX1NDC(st->GetX1NDC() - 0.1);
    st->SetX2NDC(st->GetX2NDC() - 0.1);
    st->SetY1NDC(st->GetY1NDC() - 0.02);
    st->SetY2NDC(st->GetY2NDC() - 0.02);
    gPad->Modified(); gPad->Update();

Hi pepe and thanks…the code changes the position of the statistic box, but I’ve other problem…in each plot the numbers of the color gradient are covered by other plot (third plot of first line is cutted by the end of the canvas)…for example in the first plot, the numbers of the gradient colo must be 200, 400, 600, etc…but we reat 20, 40, ecc

Right before every “Draw”, execute: gPad->SetRightMargin(0.12);

Thank you pepe! you solved!