RE: [ROOT] marker when a tree is drawn

From: Philippe Canal (pcanal@fnal.gov)
Date: Tue Jul 29 2003 - 22:34:59 MEST


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