Error: Can't call TCanvas::SetBottonMargin in current scope

Hi, I can’t seem to understand why this doesn’t work.

TCanvas * cl = new TCanvas(“cl”,“cl”,600,600);
input_hist1->Draw();
input_hist1->SetAxisRange(20.0,100.0,“X”);
input_hist1->SetAxisRange(0.3,0.7,“Y”);
input_hist1->GetYaxis()->SetTitleOffset(1.5);

input_hist2->Draw(“SAME”);
input_hist2->SetMarkerStyle(20);
input_hist2->SetMarkerColor(kBlue);
input_hist2->SetLineColor(kBlue);

cl->SetBottonMargin(0.35);

input_hist1 and input_hist2 are declared earlier. The last line causes the error msg:
Error: Can’t call TCanvas::SetBottonMargin(0.35) in current scope

I don’t understand why this doesn’t work because I do basically the same thing in another code.

Above that code snippet, I have:

TCanvas * c2 = new TCanvas(“c2”,“c2”,600,600);
sys_hist->Draw();
c2->SaveAs(“file.gif”);

Not sure if it matters. It looks like there’s a bug in ROOT.

HI,

I think you have a typo in the name (‘n’ at the end of Bottom). Try:cl->SetBottomMargin(0.35);

Philippe.