Re: [ROOT] plot 3D function

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Oct 06 2003 - 17:06:03 MEST


Hi Claus,

Did you try TH2F? If you have a grid with equidistant points along x and y,
you can create a TH2F and fill it with
  h2.Fill(x,y,z);
then draw it with one of the "surf" options.

If your points are not equidistant, you can still use a variable bin size
TH2F.

We are now developing a new class TGraph3D that will accept a general
xy pairs with the corresponding z value. We hope to have this new class
ready in the coming weeks.

Rene Brun

Claus Horn wrote:
> 
> Dear Rooters,
> 
> from a scan in parameter space I have a function z(x,y),
> which I would like to plott. (with z-values of 100-400)
> Actually I dont wont to use a histogram as I dont wont
> scattering. (Or can this be switched off ?)
> But TGraph does only work for y(x), or is there a posibility
> to have z(x,y) ?
> Anyway, if I tryed to use a TH3F histogram, but than the
> "surf" draw option which works for TH2F does not seam to work.
> Probably there is an easy way which I just dont see.
> I would very much apreceate any help.
> 
> Claus Horn



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET