Treating a TH2 as a scatter plot

Hi there. I’m using a TH2 object to look for correlations between two variables that get calculated from my data stream. Is there a good way to treat this as a scatter plot so that I can fit a TF1 to the y variable as a function of the x variable?


Vic Gehman

see an example in tutorials/fit/fit2d.C


That did it–Thanks!

Now at the risk of sounding really needy and obnoxious, is there a way to not draw the statistics box? I tried a

That usually works, but I can’t seem to turn it off when I draw any of the TProfile objects I’ve created. Any suggestions?



If your TProfile objects have been created before you set the style,
you can call


Thank you!