Hi Johnathan, In: ntuple->Draw ("x:y:z:v", "x < .1 && x > -.1"); The order of the axis is actually: Z - Y - X - color number Hence you should do: htemp->SetXTitle("Z"); htemp->SetYTitle("Y"); htemp->SetZTitle("X"); Cheers, Philipppe -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Johnathan Wang Sent: Monday, October 20, 2003 10:54 AM To: roottalk@pcroot.cern.ch Subject: [ROOT] ntuple draw bug??? Hi, I've the following piece of code which draws an ntuple under a condition. However, if one looks at the plot, one would notice that it's the z variable, not the x variable, that's constrained according to the cut. Is this a bug? If so, would you fix it? Thank you so much john { gROOT->Reset(); TCanvas *canvas = new TCanvas("canvas","foo",200,10,700,780); TNtuple *ntuple = new TNtuple("ntuple", "data from ascii file", "x:y:z:v"); ntuple->ReadFile ("foo"); ntuple->Draw ("x:y:z:v", "x < .1 && x > -.1"); TH1F *htemp = (TH1F*)gPad->GetPrimitive("htemp"); htemp->SetXTitle("x"); htemp->SetYTitle("y"); htemp->SetZTitle("z"); } ################################################################# ################################################################# ################################################################# ##### ##### ##### ################################################################# ################################################################# #################################################################
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET