Change axis label of a histogram

Hi, is there any way to change the numbers displayed on a histogram without changing its content? If I create a histogram like this:

TH1D *hDum = new TH1D("hDum", "hDum", 160, 0, 160);

But I want the x-axis to print only [0,40,80,120,160] and also with small division ticks

Kind regards,
Haidar.

Hi Haidar,

Perhaps hDum->GetXaxis()->SetNdivisions(...) can do what you need.

Cheers,
Jakob

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