Set axis title offset in style

Hi,

maybe I’m doing something wrong, but my histograms ignore whatever I set with SetTitleXOffset() on gStyle. I also tried with gROOT->ForceStyle(true) already, but no luck. Any ideas?

Cheers,
Johannes

This is strange. When I use gPad->UseCurrentStyle(), it applies the style. But not with gROOT->ForceStyle()? And it does not work for any style at all! What am I doing wrong?

This one work for me:

{
  gStyle->SetTitleYOffset(1.3);
  gStyle->SetTitleXOffset(1.3);

  gROOT->ForceStyle(true); 
  hpx->SetYTitle("Some Title For This Axis");
  hpx->SetXTitle("Some Title For This Axis");
  hpx->Draw();
}

hpx is the histogram stored in hsimple.root. generated by $ROOTSYS/tutorials/hsimple.C

That works for me too. I don’t understand. Sometimes it is working, and sometimes not. Now I can’t even reproduce the problem. And I swear I’m doing it the same way as before. Ok, forget about my question. Maybe I’m just hallucinating.