This question was already asked here How to set TH2F draw with SURF1 but not render by Z value please avoid double posting.