Here is a short version of the "script"
TH2F *correl =new TH2F("Correlation", "MaPTM #3",64,0.5,64.5,64,0.5,64.5);
for(int i=1;i<=64;i++){ //pixel x
for(int j=1;j<=64;j++){ //pixel y
Some calculatons
for(int k=1;k<=ne;k++){ //loop over nb of entries
Some more calculations
}
float p=covXY/(sigmaX*sigmaY);
correl->Fill(i,j,p);
}
}
Thanks
On Sat, 6 Nov 2004, Rene Brun wrote:
> Reinhart,
>
> Please send the shortest possible script illustrating your problem.
>
> A priori, it looks like you are filling bins with values of i or/and j
> at the edge of the bin (precision problem). Instead, specify the bin
> center.
>
> Rene Brun
>
> On
> Sat,
> 6 Nov 2004, Reinhardt Chamonal wrote:
>
> > Hi,
> >
> > I am using v4.00/01
> > I am filling a 2d histogram (wihtin a C porgram) , with:
> > correl->Fill(i,j,p);
> > where i and j are integers and p is a float.
> > Now my problem is that when I draw the histogram in col mode sometimes the
> > color isn't right when my entry is 1, 1 being my maximum value. With a
> > palette from blue to red, sometimes it would be blue and sometimes red
> > eventhough the entry is one :(
> > Any idea of what I might be doing wrong ?
> > I have attached two pictures where the diagonal illustrates the problem.
> >
> > Cheers
> >
> >
> >
> >
> >
>
--
------------------------------------------------------------
Reinhardt CHAMONAL The University of Edinburgh
School of Physics
email: chamonal@ph.ed.ac.uk King's Buildings, JCMB, 5301
Mayfield Road
phone: +44-131-650 5307 Edinburgh, EH9 3JZ
web: http://www.ph.ed.ac.uk/~chamonal/
http://www.reuh.ovh.org
------------------------------------------------------------
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET