Saved canvas is magnified in top left corner

Hi

After filling a TCanvas,

TCanvas *c1= new TCanvas("c1","stacked hists",600,600);
c1->Divide(3,3);

          for (int i=0;i<CutN;i++){

          sprintf(tt,"%s%i","mutau/met_MT_",i);
          hmet_MT[i] = (TH2D*) file->Get(tt);
          c1->cd(i+1);hmet_MT[i]->Draw("colz");
}

	c1->Update();
        c1->SaveAs("met_MT_"+fileName+".png");

The problem is that the TCanvas is not saved properly


but while running the code, the canvas that pops up is split properly…
thanks in advance

1 Like

I think this is the same bug as reported here:

Ok, thanks

So, temporarily, what is working for me is to just execute my script with the “-b” flag as well ie

root -l script.C -b

so in the silent mode actually my canvases are save in the dimensions and are filled properly if I open them afterwards.

Regards

As the problem Wile refer to has been fixed this one (according to him) might be fixed toot. Unfortunately I cannot try it because the macro posted at the top cannot be executed.