[ROOT] Problem with variable bin histograms

From: Natalia Kuznetsova (natalia@SLAC.stanford.edu)
Date: Mon Sep 09 2002 - 04:47:33 MEST


Dear ROOTers,

  I would like to create a variable bin histogram with the following array
of low edges:

  Float_t Lower[8];

  Lower[0] = 2;
  Lower[1] = 3;
  Lower[2] = 4;
  Lower[3] = 5;
  Lower[4] = 6;
  Lower[5] = 8;
  Lower[6] = 10;
  Lower[7] = 14;

  I used TH1F* hist = new TH1F("hist","", 7, Lower);

  The resulting histogram appears to be skewed by 1 bin.  When I print out
the bin content, it says:

bin 0 = 0.005
bin 1 = 0.013

   but the actual histogram's first point sits at 2.5 (the histogram
starts at 2), and it is the entry corresponding to bin 1 (0.013).

   How do I make sure that bin 0 is plotted, and plotted exactly at 2?

   Thanks for your help,

   Natalia

______________________
Natalia Kuznetsova
Fermilab/CDF
P.O. Box 500, MS 318
Batavia, IL 60510
(630) 840-5115
______________________



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:08 MET