Axes title disappearing when I use log scale

I am plotting a graph with error bar. When I set the axes to log scale the axis title disappears. My version of ROOT is 6.13/01. What could be the cause?

void ans_In115_cs()
{
TCanvas *c1 = new TCanvas();
TGraphErrors *gr = new TGraphErrors("n+In115_cs1.txt");
gr->Draw("AP");
gr->SetTitle( "" );
gr->GetXaxis()->SetTitle( "Energy (MeV)" );
gr->GetYaxis()->SetTitle( "Cross-section (mb)" );
gr->GetXaxis()->CenterTitle();
gr->GetYaxis()->CenterTitle();
gr->GetYaxis()->SetDecimals(kTRUE);
gr->GetXaxis()->SetDecimals(kFALSE);
TGaxis::SetMaxDigits(3);
gr->GetYaxis()->SetTitleSize(0.043);
gr->GetXaxis()->SetTitleSize(0.043);
c1->SetLogx();
gr->GetYaxis()->SetMoreLogLabels();
c1->SaveAs("ans_n_In115_cs_plot.pdf");
}

Can you provide the data file (or a subset of it) ?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.