void palettevb() { /* palette */ const Int_t colnum = 10; Int_t palette[colnum]; int i,j; double Wcol,w1,w2,r,g,b; TColor *color; for (i=0;i bleu w1=i*0.06; w2=i*0.09; r=0.4; g=1-w2; b=0.4+w1; cout << "rgb :" << r << " " <GetColor(500+i)) { color = new TColor(500+i,r,g,b,""); } else { color = gROOT->GetColor(500+i); color->SetRGB(r,g,b); } palette[i] = 500+i; } /* palette standard */ //gStyle->SetPalette(1); gStyle->SetPalette(colnum,palette); gStyle->SetHistFillStyle(1001); //gROOT->ForceStyle(); /* pour tester */ TCanvas *myc = new TCanvas("myc","myc",0,0,500,600); myc->Divide(2,2); ghist = new TH1F("Gaussian1","This is a gaussian",10,-10,10); ghist2 = new TH2F("Gaussian2","This is a gaussian",10,-10,10,10,-10,10); gRandom->SetSeed(); for (Int_t i = 0; i < 5000; i++) { ghist->Fill(gRandom->Gaus(0,5)); ghist2->Fill(gRandom->Gaus(0,5),gRandom->Gaus(0,5),1); } color = new TColor(990, 0.8, 0.2, 0.2); int const top_col = 990; //color = gROOT->GetColor(500+i); myc->cd(1); ghist2->Draw("colz"); myc->cd(2); ghist->SetLineColor(502); ghist->SetFillColor(502); ghist->Draw(); myc->cd(3); ghist->SetLineColor(top_col); ghist->SetFillColor(top_col); ghist->Draw(); myc->cd(4); ghist->SetLineColor(509); ghist->SetFillColor(509); ghist->Draw(); }