Re: Bug in drawing scatter plot with TNtuple using SAME?

From: Rene BRUN <rene.brun_at_cern.ch>
Date: Fri, 11 Feb 2005 09:44:41 +0100


Hi Chris,

Replace your last statement

   myntup->Draw("a:b","b>0.15","SAME");
by

   myntup->Draw("a:b","b>0.15","SAMEp");

Rene Brun

Chris Roat wrote:
> Hi,
>
> The following macro shows that drawing a 1D histogram from a tree and
> overlaying a 2nd in a different color works, but that doing the same
> thing for a 2D scatter plot does not. I expect that the 2 right-most
> points in the right-hand plot should be red.
>
> I've tried this on a Debian Linux using ROOT 3.10.02 and 4.02.00.
>
> Cheers,
> Chris
>
> void treeSameProblem() {
>
> TNtupleD *myntup= new TNtupleD("mytree","mytree","a:b");
> myntup->SetMarkerStyle(kFullCircle);
>
> myntup->Fill(0.1,0.1);
> myntup->Fill(0.1,0.2);
> myntup->Fill(0.2,0.1);
> myntup->Fill(0.2,0.2);
>
> c1= new TCanvas("c1");
> c1->Divide(2,1);
>
> c1->cd(1);
> myntup->Draw("b");
> myntup->SetLineColor(kRed);
> myntup->Draw("b","b>0.15","SAME");
>
> c1->cd(2);
> myntup->Draw("a:b");
> myntup->SetMarkerColor(kRed);
> myntup->Draw("a:b","b>0.15","SAME");
>
> }
>
Received on Fri Feb 11 2005 - 09:44:48 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET