Hi! I think the easiest solution is to define the histo with the draw command. Two options: 1. myTree->Draw("var1:var2>>histo",cut); makes a new histogramm with the name "histo". afaik then one can modify histo 2. myTree->Draw("var1:var2>>histo2(100,0,1,100,0,1)",cut); makes a 2d histogram with 100 bins x, 100 bins y Greets Michael Philippe Canal writes: > Hi, > > When doing: myTree->Draw("var1:var2",cut); > rather than drawing an histogram, ALL the data is drawn using a TPolyMarker. > > The simpliest solution is to set a default marker for the tree: > myTree->SetMarkerStyle(3); > myTree->Draw("var1:var2",cut); > Or after the fact you can do > myTree->Draw("var1:var2",cut); > p = dynamic_cast<TPolyMaker*>( > gPad->GetListOfPrimitives()->FindObject("TPolyMaker") ); > if (p) p->SetMarketStyle(3); > > Cheers, > Philippe. > > -----Original Message----- > From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On > Behalf Of Stilianos Kesisoglou > Sent: Tuesday, July 29, 2003 3:13 PM > To: roottalk@pcroot.cern.ch > Subject: [ROOT] marker when a tree is drawn > > > Hi, > > I am having a problem to set the marker size and style when I draw > directly from a tree: > > myTree->Draw("var1:var2",cut); > > If I try to set the marker attributes for the histogram "htemp" there is > no effect. The same happens > if I try to do it interactively with the mouse. > > When I first book a TH2F histogram (named "histo") and then I do: > > myTree->Draw("var1:var2>>histo",cut); > > then I can set the marker attributes for the histogram "histo". > > Any way to do it directly on the first case without booking a histogram? > > Thanks! > > Stelios. > > > ################################################################# > ################################################################# > ################################################################# > ##### > ##### > ##### > ################################################################# > ################################################################# > #################################################################
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET