Re: Setting bins for TTree.Draw

From: Rene Brun (brun@hpbrun.cern.ch)
Date: Tue May 19 1998 - 22:19:36 MEST


Bill,
What you do is correct, EXCEPT the histogram type.
Use TH1F, not TH1

Rene Brun


On Tue, 19 May 1998, William Love wrote:

>  Dear Roots
> 
>     I plot a histogram from a TTree (made with h2root) of
>  an integer variable and ROOT picks bad bins.  I tried to do 
>  TH1 *hrows = new TH1("hrows","TPC rows",45,0.5, 45.5);
>     to set good bins and then 
>  h10.Draw("row>>+hrows");
>     but I got 
>  Warning in <TTree::Draw>: Deleting old histogram with different dimensions
>     and the same wrong-headed histogram.  There seems to be no
>  TTree.SetBins method.  You used to could do graph/hplot/null in
>  PAW and then draw on the premade plot.  Must be able to do it
>  in ROOT?
> 
>                      Bill Love
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:33 MET