see example below
Rene Brun
void h12() {
    TRandom r;
    TH1F *h1[5];
    for (Int_t i=0;i<5;i++) {
       h1[i] = new TH1F(Form("h1%d",i),"test",100,0,100);
    }
    for (Int_t j=0;j<10000;j++) {
       for (Int_t i=0;i<5;i++) {
          h1[i]->Fill(r.Gaus(40+5*i,1.1*(i+1)));
       }
       for (Int_t j=0;j<100;j++) {
          h2->SetBinContent(j+1,i+1,h1[i]->GetBinContent(j+1));
       }
       c1->cd(i+1);
       h1[i]->Draw();
On Fri, 27 
Jan 
2006, Venkatesh Kaushik wrote:
> Hi All,
> I have 5 1d histograms. They are efficiencies that I
> have determined. For example, I have pT  as a
> function of detector eta. There are 5 detector eta
> regions. So I have 5 1d histograms. I want to merge
> them into a single 2d histogram of pT vs detector eta.
> Is there a way to merge several 1d histograms into
> a single 2d histogram?
>
> My question is rather basic, but this is the best I could
> describe.
> Thank you in advance for your inputs.
> Venkatesh
>
Received on Fri Jan 27 2006 - 19:14:31 MET
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET