Hi Julien, You can use the "FindBin" method which returns the bin number for a given X, and then "GetBinContent" So the calling sequence will be: hist->GetBinContent(hist->FindBin(x)); Cheers, Marek. On Thursday 25 September 2003 11:16, Julien Bolmont wrote: > Hello rooters ! > > I use ROOT 3.04.02. > > Is there any solution to get the bin content directly with the X > coordinate ? > > One possible solution is: > - With the X coordinate, find the number of the corresponding bin (with a > loop, which is time consuming !) > - Get the bin content with GetBinContent(number_of_the_bin). > > Is there any better solution ? > > Thanks a lot. > Julien
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET