SetTitleOffset in macro

Dear all, I am trying to move the axis title using SetTitleOffset but I am failing.
Please run the attached macro to reproduce the problem:

You can see from the attached png file that the modification is not taken into account.
I have tried the usual combination of TPad::Modified()/Update() but this time it is not working for me.

Am I missing something?

Many thanks in advance and best regards,
Marco Bomben

PS I am using root-6.06.0(6|8)



data_2D_z_25.dat (39.7 KB)
DrawEz.C (504 Bytes)

  g->GetHistogram()->GetXaxis()->SetTitleOffset(2.);
  g->GetHistogram()->GetYaxis()->SetTitleOffset(2.);
  g->GetHistogram()->GetZaxis()->SetTitleOffset(1.2);

Also I see you are using the rainbow colour map. You might be interested by:
root.cern.ch/rainbow-color-map

Thanks Olivier, now it works. Thanks also for pointing me at the rainbow color map.
You can consider this issue as solved.
Best regards,
Marco Bomben