Hi all,
I was trying to save some TH2s in a TFile. In order to make them nice, I decided to make some changes to gStyle (SetPalette(1), SetOptStat(000000000)). To apply this new style I use UseCurrentStyle().
{
TFile *f = TFile::Open("file.root", "RECREATE");
TH2D *h = new TH2D("hist","testhist",100, -3, 3, 100, -3, 3);
h->FillRandom("gaus", 1000);
h->SetOption("COLZ");
gStyle->SetPalette(1);
gStyle->SetOptStat(000000000);
h->UseCurrentStyle();
h->Write();
f->Close();
}
When I open the root-file and the TH2 from the ROOT Browser I get a plot without StatBox (as expected) but without the chosen colour Palette (not expected).
Does anyone know why this is and how I could change it?
Thanks for your help.
Cheers,
crgg