User Tools

Site Tools


How to Set the Number of Divisions in a TH1


It may sometimes be useful to set the number of divisions for the axes of a TH1 in ROOT.

How to


myhisto->GetXaxis()->SetNdivisions(ndiv, )

where ndiv = n1 + 100n2 + 10000*n3, where n1, n2, n3 are the number of primary, secondary and tertiary divisions. So 503 gives 3 main ticks, and 5 sub ticks between each of the main tick. And what is this option?

root/numberofdivisions.txt · Last modified: 2010/11/09 16:37 by nchiap