#includeTH1D *hist = new TH1D("hist", "My Histogram", 100, 0, 10);
double data[] = {1.2, 3.4, 6.7, 2.1, ...}; int numData = sizeof(data)/sizeof(double); for (int i=0; iFill(data[i]); }
double binContent = hist->GetBinContent(5); // get the content of the 5th bin
hist->GetXaxis()->SetTitle("X Axis Title"); hist->GetYaxis()->SetTitle("Y Axis Title");TH1D belongs to the ROOT package library.