Rotate 2D histogram

Dear Rooters,

I am trying to rotate a 2D histogram, which is drawn in “COLZ” option. I follow an example of rotation by using TTree in a poster and store the two variables m_x and m_y into TTree. Then I try to rotate data in TTree, but I failed.

I put my code in the attachment. Could you please give me some suggestion on how to rotate data by using TTree?

Thank you very much for your help!

RotateData.cpp (834 Bytes)

Fix the typo in your code “TCavnas” -> “TCanvas” and tell us what is the problem.
Post a short running script.