Re: [ROOT] markersize depending on z

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Aug 05 2004 - 08:50:20 MEST


Hi Bernd,

This is not implemented, but you can easily get this functionality
with a few additional lines of code. See example below.

Rene

void marks () {
   TFile *f = TFile::Open("hsimple.root"); //from tutorials
   TTree *ntuple = (TTree*)f->Get("ntuple");
   Int_t n = ntuple->Draw("py:px","pz/5","a");
   TMarker *m;
   for (Int_t i=0;i<n;i++) {
      m = new TMarker(ntuple->GetV1()[i],ntuple->GetV2()[i],24);
      m->SetMarkerSize(ntuple->GetW()[i]);
      m->Draw();
   }
}
   

Bernd Reinhold wrote:
> 
> Hi!
> 
> I have a TTree T with three columns x, y, z. I'd like to plot x against y (with tv__tree->Draw("x:y", "", "").
> The size of the markers shall depend on z.
> z is a double from the interval [0,1), with two digits precision.
> 
> Any hint/ help is appreciated.
> 
> Thanks, Bernd.



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET