Hi,
In your example the bin content is outside of the range and therefore is
not displayed.
I think it would be really confusing to see a line not attached to any
data points.
You would not know where it is coming from.
A piece of error bar without the data point visible has no real meaning.
That's why it was done that way.
Cheers,
Olivier
-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch]
On Behalf Of Markus Cristinziani
Sent: Tuesday, April 07, 2009 4:28 PM
To: roottalk_at_root.cern.ch
Subject: [ROOT] Error bar not displayed if bin content above histogram
maximum
Hello,
I have a TH1D histogram with errors and I would like to SetMaximum to a value, lower than a certain bin content. Draw will then draw nothing, although one might prefer to draw the rest of the error bar. I wonder whether this is intentional (i.e. there are good examples where you don't want that), or the behavior of Draw could be modified. Thanks.
Markus
TH1 *h1= new TH1D("h1","h1",1,0.,1.);
h1->SetBinContent(1,5.); h1->SetBinError(1,3.); h1->Draw(); // bin content and error displayed correctly
h1->SetMaximum(4);
h1->Draw(); // could bin error be displayed ?
-- Markus Cristinziani Physikalisches Institut, Uni Bonn tel: +49(0)228-735762 http://mc-eng.physik.uni-bonn.de/Received on Tue Apr 07 2009 - 16:35:21 CEST
This archive was generated by hypermail 2.2.0 : Tue Apr 07 2009 - 17:50:01 CEST