Re: [ROOT] Histigramming xmax

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Jun 20 2000 - 19:13:24 MEST


Hi Dmitri,

I assume that you want something like TH1:RebinAxis, see URL:

   http://root.cern.ch/root/html/TH1.html#TH1:RebinAxis

This function keeps the number of bins and extends the axis limits.
If the histogram is already filled (including the sum of squares of weights),
the complete data structure is recomputed.

In your case, you probably want to see the same behaviour but with
an unmodified bin size and a modified number of bins.

What about a function:

   void TH1::ExtendAxis(Axis_t x, const char *axis)

This will work for both min and max on a 1-d, 2-d or 3-d histogram.

Rene Brun


Dmitri Litvintsev wrote:
> 
> Dear Rootters,
> 
> Is it possible to add a method to TH1F like
> SetXmax(xmax)?.
> In order not to run into problem of the rebinning, tha actual
> xmax will become:
> 
> int nExtraBins = (xmax - xmax_old) / binwidth;
> xmax           = xmax_old + nextrabins * binwidth;
> nBinsNnew      = nBins + nExtraBins;
> 
> Since ROOT is used in on-line monitoring -- interactive
> change of maximum x value is really of value.
> (I used to have it in LabView)
> Analogously - one would want to have SetXmin method
> 
> I'd appreciate your remarks on this subjects
> 
> thanks
> Dmitri Litvintsev
> 
> /----------------------------------------------------------\
> | Tel:       (630) 840 5005                                |
> | FAX:       (630) 840 2968                                |
> | office:    169-E CDF Trailers                            |
> | E-mail:    litvinse@fnal.gov                             |
> \----------------------------------------------------------/



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:28 MET