Label 3 dim histogram

Hi,

maybe a simple problem. I have created a TH3D histogram and I want to label it with:

DiffPhi_vs_DiffPtElectron_vs_DiffPtTau[s]->GetXaxis()->SetTitle(“Pt Electron [GeV]”);
DiffPhi_vs_DiffPtElectron_vs_DiffPtTau[s]->GetYaxis()->SetTitle(“Pt Tau [GeV]”);
DiffPhi_vs_DiffPtElectron_vs_DiffPtTau[s]->GetZaxis()->SetTitle(“Delta Phi”);

I get the following histogram (see attachment). How can I avoid the overlap of the title and the numbers?

Thanks!
Gordon
test1.pdf (23.5 KB)

Change the title offset with
myhist.GetXaxis()->SetTitleOffset(1.5); //default is 1

When you have this type of problem, use the graphics editor on the histogram object, click on the axis and use the interactive menu/slider to change the distance. Once you are happy, use “SaveAs canvas.C” and look at the code generated to set the options.

Rene

Hi,

now it is fine…

Thanks!
Gordon