TH1D *hist = new TH1D("histogram", "Histogram Title", 100, 0, 100); hist->SetTitleSize(0.05); //sets the histogram title font size to 5% of its default size
gStyle->SetTitleSize(0.06, "xyz"); //sets the title size for x, y, and z-axis to 6%In this example, we use the SetTitleSize function with a global parameter to set the title size for all three axes to 6%. This function call affects all histograms displayed in the current program. Overall, the SetTitleSize function is a useful tool for customizing the appearance of histogram titles. The ROOT package library provides many other functions for more in-depth histogram customization.