Re: [ROOT] drawing histos with null y-errors

From: Rene Brun (Rene.Brun@cern.ch)
Date: Sat Feb 14 2004 - 16:18:08 MET


Use option "hist".
See documentation of TH1::Draw, THistPainter::Paint

Rene Brun

On Sat, 14 Feb 2004, 
David d'Enterria wrote:

> Hi ROOT team,
> 
> I want to plot (for graphical purposes only) a histogram which has been 
> filled manually and has null y-errors. The default drawing option for 
> histos in this case produces a "blank" output in the canvas:
> 
> TH1D* h = new TH1D("h","h",100,0,100);
> h->FillRandom("pol1",5000);
> h.Draw(); // no problem here the histo has non-null y-errors
> for (int i=0;i<h->GetNbinsX()+1;i++){h->SetBinError(i,0.);};
> h.Draw(); // the histo "disappears"
> h.Draw("h"); // OK the histo is back there ...
> 
> Is this is a bug or a feature ? Why doesn't THistPainter::Paint 
> <http://root.cern.ch/root/htmldoc/THistPainter.html#THistPainter:Paint>(Option_t 
> *option) set the default (empty) draw option to "h" in this case ?
> 
> Thanks.
> 
> PS: Using root_v4.00.01.Linux.RH7.3.gcc296 binaries (same feature in 
> root_v3.10.01.Linux.RH7.3.gcc296)
> 
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET