TH1D* h1 = new TH1D("h1", "Example Histogram", 100, 0, 100); h1->GetYaxis()->SetLabelSize(0.04); // change font size of Y-axis labels
TH1D* h1 = new TH1D("h1", "Example Histogram", 100, 0, 100); h1->GetYaxis()->SetRangeUser(0, 10); // set Y-axis range to [0, 10]In this example, we create a new TH1D object and set the Y-axis range to range from 0 to 10. Package library: ROOT