Re: Error bar not displayed if bin content above histogram maximum

From: Markus Cristinziani <cristinz_at_uni-bonn.de>
Date: Tue, 7 Apr 2009 16:44:35 +0200


Hi Olivier,

 I agree, that the length of the piece of error bar would not be helpful. On the other hand one could at least tell that there *is* a content or even whether the bin content is higher than the maximum or lower than the minimum. In my specific application I am using TH1::Divide and displaying the ratio with fixed boundaries. I don't have a nice solution at the moment either.

cheers,
 Markus

On Tue, Apr 7, 2009 at 4:35 PM, Olivier Couet <Olivier.Couet_at_cern.ch> wrote:
> 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/
>

-- 
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:44:47 CEST

This archive was generated by hypermail 2.2.0 : Tue Apr 07 2009 - 17:50:01 CEST