Drawing a contour plot from irregularly spaced data

Dear ROOT people

I would like to draw a contour plot (or any other of the more advanced 2D histogram plots) from data which are not available in regularly spaced intervals (i.e. not a 2D histogram). The data are of the form (x,y,z=f(x,y)), where x and y can assume arbitrary values (a TPolyMarker3D for instance).

Note that IDL, for example, can do that (‘contour /irregular …’).

I know that a lot of effort has gone into 2D/3D graphics in ROOT recently, so before cooking up something myself, I just want to check if something appropriate is already available in ROOT.

Many thanks in advance!


Use the class TGraph2D. See: root.cern.ch/root/html/TGraph2D.html
With this class (in addition to the class specific drawing options) you can also use
all the TH2 draw options like CONT, lego, etc


Precisely what I was looking for! ROOT rocks! 8)

Thank you so much,