[ROOT] Lost of the memory of SetDrawOption()?

From: Daniel Cussol (cussol@in2p3.fr)
Date: Wed Oct 23 2002 - 17:15:04 MEST


Hello Rooters,
 I am facing the following problem: when I want to set a default Draw
Option by using the SetDrawOption method, it seems that this a no effect
when the object is plotted.

root [37] TH2F *h2=new TH2F("hh","Test",20,0,10,20,0,10)
root [38] h2->SetDrawOption("box")
root [39] h2->Fill(1,2,1)
root [40] h2->Fill(2,2,3)
root [41] h2->Fill(8,6,15)
root [42] h2->Draw()


The h2 histogram is plotted with the scatter plot ("HIST") option.
If I now add objects to the list of function of this object, the draw
options are also "lost" when plotting the histogram. Here is another
example.

root [24] TArrow *ar=new TArrow(5.,0.,5.,5.)
root [25] ar->SetArrowSize(0.05)                    
root [26] ar->SetFillColor(kRed)
root [26] ar->SetDrawOption("|>")
root [27] h2->GetListOfFunctions()->Add(ar)
root [28] h2->Draw()

The arrow is plotted as a straight line without any arrow, as if the ""
Draw option was set. When looking at the DrawOption of the objects (using
GetDrawOption() ), it seems that the SetDrawOption(Option_t *) has no
effect!

Is it a standard behaviour? Could it be possible to store the wanted draw
option and use it while drawing the object, as it was the case for "old"
root versions?

I use root v3.02/04 alphacxx6 on Alpha UNIX DS20.

Daniel CUSSOL

LPC Caen
Boulevard du Marechal Juin
14050 CAEN CEDEX

e-mail : cussol@in2p3.fr
Tel    : +33-(0)2-31-45-29-73
FAX    : +33-(0)2-31-45-25-49



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:15 MET