TNtuples and TH3s

From: Glen R. Salo (gsalo@mrcday.com)
Date: Wed Feb 09 2000 - 18:23:01 MET


I'm trying to create a 3D Histogram from a TNtuple as follows:

TFile f("hsimple.root");
TNtuple *n = (TNtuple *)f.Get("ntuple");
n->Draw("pz:py:px>>hh","","goff");
hh->Draw();

The histogram hh is created, but the axes are not set, and hence, hh be
drawn.  A simple fix is to replace the third command with:

n->Draw("pz:py:px>>hh");

but this draws a 3D view which I do not need.  In the 2D below, the "goff"
option works just fine.  Is this the desired behavior?  If so, is there a
simple way to keep the 3D view from appearing?

TFile f("hsimple.root");
TNtuple *n = (TNtuple *)f.Get("ntuple");
n->Draw("py:px>>hh","","goff");
hh->Draw();

Thanks for your help,

Glen



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:18 MET