TH1D* h = new TH1D("h", "title", 100, 0, 10); h->GetXaxis()->SetLabelSize(0.02);
TH1D* h = new TH1D("h", "title", 100, 0, 10); h->GetYaxis()->SetLabelSize(0.03);In this example, we create a new TH1D object named "h" with 100 bins ranging from 0 to 10. We then set the size of the y-axis labels to 0.03 using the SetLabelSize method of the Yaxis object. Both of these examples demonstrate the use of the SetLabelSize method to customize the size of axis labels in a TH1D object. The package/library used in these examples is ROOT.