Setting bins TH2F does not work properly in Draw method

Hi all,
a simple question… I am unable to set correctly the X-Yaxis binning when trying to plot such thing:


It seems that the binning over X=8,Y=400 and Z=10 are ignored… is there a way to achieve that?

If i do the following with the ntuple generated by:
it works fine.


Why with ntuple works and TTree not?

I think there is a typo in your expression, what does “hcolz” mean? Try with “box”, or leave it unspecified.

And why do you plot a “3” in the y axis? (varx:3:varz)

Also, the binning x=8 does not match with your definition of histo1(10, …), you mixed the position.

thanks for your clarification!