void test_stack() { THStack *hs = new THStack("hs", "test"); TH1F *h[3]; for ( Int_t i = 0; i < 3; i++ ) { h[i] = new TH1F(Form("h%d", i), Form("test h%d"), 50, -5, 5); h[i]->FillRandom("gaus"); h[i]->SetLineColor(2*i+2); hs->Add(h[i]); } hs->Draw("ehist nostack"); }