Problem with generating TProfile from a TTree

I have a TTree and it contains several variables like fX, fY, fZ, fT etc. I wish to make a TProfile of fTime {fY}, and I tried by Draw(“fTime”,“fY”, “prof”) of the TTree, and from, I only got a TH1F, without any TProfile. Why is that and what should I do to obtain the TProfile?

Draw(“fTime:fY”, “prof”)


When I input your code, the following code was generated:
Bad numerical expression : “prof”

Sorry for the typo. It should be:
Draw(“fTime:fY”, “”,“prof”)
See doc of TTree::Draw and the Users Guide


Thanks very much, the problem solved now