Changing style of 2-D histogram

I think you need to specify your ROOT version (I’m afraid I see no such problem with my ROOT 5.34/26).
I tried: { gROOT->SetStyle("Pub"); // gROOT->ForceStyle(1); // uncomment either this line ... TCanvas *c = new TCanvas("c", "c"); // the "hsimple.root" file comes from ${ROOTSYS}/tutorials/ TFile *f = TFile::Open("hsimple.root"); TH2F *hpxpy; f->GetObject("hpxpy", hpxpy); // hpxpy->UseCurrentStyle(); // ... or this line hpxpy->Draw("colz"); }