Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: About ListPlot3D



Mario Cesar wrote:

> I am sorry for this question, but I do not know how to plot 3D
graphics
> from a list of numeric data produced by an external Fortran program.
My
> files have the general form: (X, Y, Z). How can I produce the heights
> needed by Mathematica ?

ListPlot3D plots the heights z corresponding to points of a
three-dimensional array in the plane xy. I assume that your data are
the  list of values (X,Y,Z), where Z is the height corresponding to
the pair  (X,Y).

You have to construct a grid in the xy plane where x varies between min
 X and max X, and y varies between min Y and max Y, in order to get an
 array of m values of x and n values of y, say.

Then, for each value of x in the array, take the list of heights z
corresponding to the consecutive values of y (you may have to fill in
zeros, if necessary). You end up with the list h {z11, z12,...,
z1n}, {z21, z22,...,z2n},...,{zm1,zm2,...,zmn}} . ListPlot3D[h] will
give the 3D plot you are looking for. However, it will assign the
values ,2,...m and 1,2,..n, respectively, to the consecutive points
along the  x and y coordinates, so that you will have to rename those
points  according to the actual values in your data. This should be no
trouble  using the TickMarks option.

Good luck,

Tomas Garza
Mexico City



  • Prev by Date: A Few More Newbie Questions
  • Next by Date: MultipleListPlot and ErrorBar
  • Prev by thread: Re: About ListPlot3D
  • Next by thread: Re: Phase portrait with arrows