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
Jean-François