Re ListPlot3D type plotting
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re ListPlot3D type plotting
- From: twj
- Date: Mon, 3 Aug 92 10:03:13 CDT
Reply to Mark Stabb >I have an array of data z=f(x,y) I would like to plot as a surface much >like ListPlot3D does. However, ListPlot3D requires a square and regularly >spaced array of x,y values. In fact in doesn't even ask for them at >all, but assumes the square, regular distribution. Is there a way to >get a similar looking plot for a rectangular grid which may not be evenly >spaced, given values of x,y, and z. I really need the surface appearance, so >ContourPlot, is out, and ParametericPlot3D requires functions, which I >don't have, and I have way too many points to make an interpolating >function. >Thanks for any ideas. If your data is properly ordered you can use the function ListSurfacePlot3D in the package Graphics`Graphics3D` and which is documented in the "Guide to Standard Mathematica Packages". This can be thought of as a list plotting equivalent of ParametricPlot3D. It will take ListSurfacePlot3D[ {{ p11, p12, p13, ...}, { p21, p22, p23, ...}, ...}] where the pij are {x, y, z} triples, form the polygons Polygon[ {pij, p(i+1)j, p(i+1)(j+1), pi(j+1)}] and display the result. Note that the points do not have to rectangularly spaced but they must be ordered. If this is not suitable the alternatives include using the function TriangularSurfacePlot in the package DiscreteMath`ComputationalGeometry` which is also documented in the "Guide to Standard Mathematica Packages". I have worked with this on smaller data sets but I don't know how well it will work with larger ones and would be interested in any comments and experiences you have in this regard. Another possibility would be to use an interpolation function but the question rules this out. How many data points are there?? Tom Wickham-Jones WRI