HELP ON Plotting 3D Surface Plots using data from an external file
- To: mathgroup@smc.vnet.net
- Subject: [mg11351] HELP ON Plotting 3D Surface Plots using data from an external file
- From: Hai-Ching Chen <chenliu@physik.fu-berlin.de>
- Date: Sat, 7 Mar 1998 02:06:28 -0500
On Wed, 16 Mar 1994, John Lane wrote:
> I am trying to plot a 3D surface graph using data in a file of the form:
>
> x1 y1 z1
> .
> xN yN zN
>
> This is the way that a plotting program called GENPLOT likes it.
>
> I have tried the following which, however, does not work:
>
> <<Graphics'Graphics3D'
> data=ReadList["datafile",Number,RecordLists->True]
> ListSurfacePlot3D[data]
>
> I get an error message and a blank screen. (These instructions came
> from the Mathematica help-line). Since my version of Mathematica
> excludes support, I can not request more help from Wolfram. They gave
> me your net address for possible help.
>
I am new on Mathematica.
I have the same problem. So I went to check MathSource first.
I found the above message.
There is a package named "ListToArray" can do this.
(item number 0206-468)
I download it and run. That's what I got.
-------------
In[1]:=
<<Graphics`Graphics3D`
<<ListToArray.m
In[3]:=
data:=ReadList["t",{Number,Number,Number}] arraydata:=ListToArray[data]
In[6]:=
ListSurfacePlot3D[arraydata]
{0.0322724, 0.0325432, 0.032814, 0.0330848, 0.0333556,
.................................
................................
0.0444584, 0.0447292, 0.045}
Out[6]=
-Graphics3D-
-----------------------
It did not show any plot but "-Graphics3D-".
Where am I wrong ? ( I am using Mathematica 2.2 and 3.0 ).
Thank you for any help.
------
Hai-Ching Chen
Email: Hai-Ching.Chen@physik.fu-berliu.de