Re: [ROOT] Coordinates of minimum bin in the TH2F,

From: Tomasz Bold (bold@fatcat.ftj.agh.edu.pl)
Date: Sat Oct 09 2004 - 09:17:18 MEST


Thanks,
	Works.
Tomasz

> if binx,biny,binz are the bin numbers corresponding to the histo
> min/maximum, you can translate the bin number to histogram coordinates
> with
>   double x = h->GetXaxis()->GetBinCenter(binx); //for TH1, TH2 or TH3
>   double y = h->GetYaxis()->GetBinCenter(biny); //for TH2 or TH3
>   double z = h->GetZaxis()->GetBinCenter(binz); //for TH3
>
> Rene Brun
>
>
> On Fri, 8 Oct
> 2004, Tomasz
> Bold wrote:
>
> > Hi,
> > 	As in subject. I want to plot marker in the position where
> > maximum/minum bins of 2D histo are located.
> > I know GetMinimumBin(x,y,z);
> > But to plot the marker I need to translate x,y(bins) to coordinates of the
> > histogram and this is accualy my question. Any idea?
> > I can loop over bins but I suspect there is smarter trick.
> >
> > Regards,
> > 	Tomasz Bold
> >
> > --------------------------------------
> > Tomasz Bold
> > mail me:
> > bold@ftj.agh.edu.pl,
> > Tomasz.Bold@cern.ch
> > Tomasz.Bold@desy.de
> > or call:
> > +48 12 617 4729 (AGH)
> > +48 12 662 8023 (IFJ)
> > -------------------------------------
> >
>
>



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