Re: [ROOT] bug in h2->draw("cont") ?

From: Mayly Sanchez (msanchez@minos.phy.tufts.edu)
Date: Thu May 29 2003 - 21:31:01 MEST


Hi Rene,
the root file is here:
http://minos.phy.tufts.edu/msanchez/dchisq90_c.root
Mayly

On Thursday, May 29, 2003, at 01:47  PM, Rene Brun wrote:

> Hi Mayly,
>
> Could you send the canvas.root file instead of canvas.gif?
>
> Rene Brun
>
> On Thu, 29 May
> 2003, Mayly Sanchez wrote:
>
>>
>> Thanks Rene, that fixed the contours but now it has a funny problem in
>> the lego plots. For some cases (I still have to determine the 
>> pattern),
>> it draws lego plots where part of it shows as a wireframe while the
>> rest seems ok. The best way to explain is a picture:
>> http://minos.phy.tufts.edu/msanchez/dchisq90_lego.gif
>>
>> Any ideas?
>> Mayly
>>
>> On Wednesday, May 21, 2003, at 06:42  PM, Rene Brun wrote:
>>
>>> Hi,
>>>
>>> Some changes have been made in the past few weeks by Olivier Couet
>>> to solve the kind of problems you are reporting.
>>> Take the version from CVS head and install from source.
>>>
>>> Rene Brun
>>>
>>> On Wed,
>>> 21 May 2003, Mayly Sanchez wrote:
>>>
>>>>
>>>> Hi,
>>>> I have a macro for drawing non-equidistant 2d contours that used to
>>>> work before but fails in most recent versions of root. The latest 
>>>> test
>>>> has been done with 3.05/05.
>>>>
>>>> Here are the steps I follow:
>>>> {TH2F *ch = new
>>>> TH2F("ch","",nbinx,nbinxmin,nbinxmax,nbiny,nbinymin,nbinymax);
>>>> ch->Fill(x,y,weight);
>>>> ch->SetContour(2);
>>>> ch->SetContourLevel(0,0.0)
>>>> ch->SetContourLevel(1,2.0)
>>>>
>>>> ch->Draw("cont2");
>>>> }
>>>>
>>>> Now what happens is: that if I do a lego2 plot before drawing the
>>>> contours, the levels are set at the proper heights. Once I have run
>>>> Draw("cont2") or any of the other cont options it recalculates the
>>>> levels in a weird way. It seems to put the first level at the
>>>> GetMinimum value and the second half way between the maximum and the
>>>> minimum, as if it wanted to do equidistant contours.
>>>>
>>>> Did something change? Can I force it to do non-equidistant contours
>>>> again? I need this urgently so any workarounds are welcome, thanks,
>>>>
>>>> Mayly
>>>>
>>>> ps. the method with SetContourLevels(2,vector) was also tested and
>>>> gave
>>>> the same results
>>>>
>>>>
>>



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET