Hi all, While I am learning how to 'bin' properly, I have discovered something odd, maybe somebody could explain that/ I attached a mini script which creates two histograms, filled by a simple vector with values from 1 to 10, only that the second histogram has a wider range to cover with the same number of bins, therefore the bin size should be smaller than in the first histogram. Why does it then look from the plot as if the bins are bigger in the second histogram? Many thanks, Michael Aye -- K.-Michael Aye, University of Durham, Dept. of Physics Phone@Work: +44-191-334-3665, Fax@Work: +44-191-334-3521 "Because the exploration of space knows no national boundaries, the loss of the Columbia is a loss to all humankind!"(Kofi Annan) { gROOT->Reset(); TVector v(10); for(int i=0;i<10;i++) v(i)=i+1; TH1S h("h","",20,-5,15); TH1S h2("h2","",20,-10,15); //TH2F h("h","",10,1,10,100,1,100); for(int j=0;j<1;j++) { for(int i=0;i<10;i++) { h.Fill(i+1,v(i)); h2.Fill(i+1,v(i)); } TCanvas c; c.Divide(1,2); c.cd(1); h.Draw(); c.cd(2); h2.Draw(); }
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET