TTree::Draw marker-color fails if "same" option used

From: Benjamin Monreal <bmonreal_at_MIT.EDU>
Date: Wed, 17 Sep 2008 17:48:49 -0400

I want to make a scatter plot in which the points are colored according to a variable. However, I want some of the points large and some small. Here's how I try to do it:

TNtuple* nt = new TNtuple("nt","nt","a:b:c"); //random data for illustration
for (int i=0;i<1000;i++) nt->Fill(gRandom->Rndm(),gRandom->Rndm (),gRandom->Rndm());

  gStyle->SetPalette(1,0);

  nt->SetMarkerStyle(22);
  nt->SetMarkerSize(1);
  nt->Draw("a:b:a+c","","zcol"); //  This correctly draws and colors  
all of the small points ...
  nt->SetMarkerSize(2);
  nt->Draw("a:b:a+c","b > 0.5","zcol same"); // but these points all come out green.

What's going on, and is there a way around it?

Thanks,

-Ben Monreal

tmp.gif
Received on Wed Sep 17 2008 - 23:50:06 CEST

This archive was generated by hypermail 2.2.0 : Thu Sep 18 2008 - 11:50:02 CEST