Error bar not displayed if bin content above histogram maximum

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


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:28:20 CEST

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