[SOLVED] TPalette function

Dear Rooters,

chain->Draw("x:y >> h1(200, 0.0, 1.1, 200, 0.0, 2.0", "", "colz");
gPad->Update();
TPaletteAxis *palette = (TPaletteAxis*) h1->GetListOfFunctions()->FindObject("palette");
palette->SetY2NDC(0.5);

do not change anything for palette. I also copied the example code at http://root.cern.ch/root/html530/TPaletteAxis.html, and that also does not change anything for palette, i.e., I could not reproduce the plot given in the example. I am using root 28.

Any suggestions will be helpful.

Thanks.

Ah, I need to redraw the histogram.

chain->Draw("x:y >> h1(200, 0.0, 1.1, 200, 0.0, 2.0", "", "colz");
gPad->Update();
TPaletteAxis *palette = (TPaletteAxis*) h1->GetListOfFunctions()->FindObject("palette");
palette->SetY2NDC(0.5);

h1->Draw("colz");

That solved the problem.