A TH1 histogram is a “one-dimensional” object in the sense that it only needs one variable. You can get one for X by doing t.Draw(“X”) as you know. Making a “histogram of X versus Y” would be a two-dimensional TH2, which you can get by doing t.Draw(“X:Y”) (or Y:X). Actually the type of object made by t.Draw(“X:Y”) depends on whether you add " >> myhist" type of commands in the string, so it’s a bit confusing. Sometimes it’s a TGraph, sometimes a TH2. See this thread: TGraph saved to file shows up as TH2F
No result. It seems to have a problem with the “h->Fit(…)” no matter what sort of function I place in the brackets. Here is my file, perhaps the problem is with the file? 900V.root (14.8 KB)