{ // Commenting out the next line makes the problem disappear gROOT->SetStyle("Plain"); const UInt_t Number = 3; Double_t Red[Number] = { 1.00, 0.00, 0.00}; Double_t Green[Number] = { 0.00, 1.00, 0.00}; Double_t Blue[Number] = { 1.00, 1.00, 1.00}; Double_t Length[Number] = { 0.00, 0.50, 1.00 }; UInt_t NColors = 77; // unwanted fill color appears from 77 onwards !!! TColor::CreateGradientColorTable(Number,Length,Red,Green,Blue,NColors); THStack *hs = new THStack("hs","Stacked 1D histograms"); TH1F *h1st = new TH1F("h1st","test hstack",100,-4,4); h1st->FillRandom("gaus",20000); h1st->SetLineColor(kRed); hs->Add(h1st); TH1F *h2st = new TH1F("h2st","test hstack",100,-4,4); h2st->FillRandom("gaus",15000); h2st->SetLineColor(kGreen); hs->Add(h2st); TCanvas *cst = new TCanvas("cst","cst",10,10,700,700); hs->Draw(); }