Hello, does anybody know how to change the colour palette in the following example in such a way, that the highest value is white and the lowest value is black with a smooth gradient from white (top) to black (bottom) in between?
{
TH2D *h2 = new TH2D("h2","h2",40,-8,8,40,-9,9);
Float_t px, py;
for (Int_t i = 0; i < 50000; i++) {
gRandom->Rannor(px,py);
Float_t random = gRandom->Rndm(1);
h2->Fill(px,py);
h2->Fill(px+4,py-4,0.5);
h2->Fill(px+4,py+4,0.25);
h2->Fill(px-3,py+4,0.125);
}
TCanvas *c1 = new TCanvas("c1","c1",10,10,400,350);
gStyle->SetPalette(1);
h2->Draw("surf2");
}