TH1F* hist = new TH1F("hist", "Title", 100, 0, 100); hist->SetYTitle("Counts");
TH1F* hist1 = new TH1F("hist1", "Title1", 100, 0, 100); TH1F* hist2 = new TH1F("hist2", "Title2", 100, 0, 100); TH1F* hist3 = new TH1F("hist3", "Title3", 100, 0, 100); hist1->SetYTitle("Counts"); hist2->SetYTitle("Counts"); hist3->SetYTitle("Counts");In this example, three new TH1F histograms are created with the names "hist1", "hist2", and "hist3", titles "Title1", "Title2", and "Title3", and 100 bins ranging from 0 to 100. The SetYTitle method is then called for each histogram to set the y-axis title as "Counts". Package Library: ROOT (CERN)