Hi Aleksei,
When an histogram is filled with SetBinError it is visualized with error
bars by default. None of the options used to visualize this histogram an
other way will work until you specify also option HIST with the option you
want. So option HIST means:
"This histogram has errors in, I know you would like to visualize it
with errors bars but please let me choose what I want !"
So specify HIST also and ROOT will let you visualize it with the C
option. Your macro is now:
void testh()
{
hid1 = new TH1F("hid1"," id1 ", 10, 0.5, 10.5);
hid2 = new TH1F("hid2"," id2 ", 10, 0.5, 10.5);
for(Int_t i=1; i<=10; i++) {
hid1->Fill(i, 2.*i);
hid1->SetBinError(i, 0.2*i);
hid2->Fill(i, 1.*i);
}
hid1->Draw("c hist");
hid2->SetLineColor(2);
hid2->Draw("c same");
}
Cheers, Olivier
--
Org: CERN - European Laboratory for Particle Physics.
Mail: 1211 Geneve 23 - Switzerland Mailbox: J25910
E-Mail: Olivier.Couet@cern.ch Phone: +41 22 7676522
WWW: http://cern.ch/Olivier.Couet/ Fax: +41 22 7677155
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET