6/12/2009

Get Histogram lay together

A THStack is a collection of TH1 (or derived) objects
Use THStack::Add to add a new histogram to the list.

If you want to draw the histogram on the log scale,
just get a pad in log scale, and draw the thstack on
this pad, everything will be done, as easy as that!!!


hvem1->SetFillColor(kRed);
hvem1->SetMarkerStyle(21);
hvem1->SetMarkerColor(kRed);
hs->Add(hvem1);


hvem2->SetFillColor(kBlue);
hvem2->SetMarkerStyle(21);
hvem2->SetMarkerColor(kBlue);

hs->Add(hvem2);

pad1->cd();
hs->Draw();
c1->Modified();
c1->Update();

没有评论: