Histogram title sizes not retained in writing out

Hello,

If I run this macro:

void main(){

  TH2F *test = new TH2F("test","test",30,-2.5,2.5,30,-1,2);
  test->Fill(-2.5,1);
  test->Fill(0.0,0.9);

  TProfile* profile = test->ProfileX();
  TAxis *yAxis_2D = test->GetYaxis();
  yAxis_2D->SetTitle("marks test");
  yAxis_2D->SetTitleSize(0.02);
  TAxis *yAxis_Profile = profile->GetYaxis();
  yAxis_Profile->SetTitle(yAxis_2D->GetTitle());
  yAxis_Profile->SetTitleSize(0.0001);
  yAxis_Profile->CenterTitle();    

  TAxis *xAxis_2D = test->GetXaxis();
  xAxis_2D->SetTitle("marks test");
  xAxis_2D->SetTitleSize(0.02);
  TAxis *xAxis_Profile = profile->GetXaxis();
  xAxis_Profile->SetTitle(xAxis_2D->GetTitle());
  xAxis_Profile->SetTitleSize(0.0001);
  xAxis_Profile->CenterTitle();    

  test->Draw();
  //profile->Draw();

  TFile f("test.root","RECREATE");
  test->Write();
  f.Close();



}
root [0] .L main.C
root [1] main()
Info in <TCanvas::MakeDefCanvas>:  created default TCanvas with name c1
root [2] 

and then start a new ROOT session to look at test.root - the axis title sizes in test.root are not the same size as those on the the canvas from the draw command.

So its the case one cannot store the modified the axis title size in the written out histogram?

I am using:

ROOT 5.34/19 (v5-34-19@v5-34-19, Jul 11 2014, 15:42:21 on linuxx8664gcc)

Cheers,

Mark

when you you read back the file can you start root with the option -n ?

Yes using the -n option solves the issue. Ah so looking at what that does, its something in my login macros causing the issue.

Cheers,

Mark

Yes your login macro should do some settings.

or may be you have gROOT->ForceStyle(); in your login macro ?