MathGroup Archive 1998

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

Search the Archive

Re: Newbie needs help with 3D plot



karland arthur kilian wrote:
> 
> Hello,
> 
>         I'm trying to have Mathematica plot a file with 121 triples which
> correspond to a scan over an energy surface.  I use the commands
> 
>         List1=ReadList["myfile", Number]
> 
>         List2=Partition[List1,3]
> 
>         ListPlot3D[List2]
> 
> However, this results in a picture which does not display the right
> z-values but instead shows a region of constant value with a
> downward-sloping region inside it.  The y and z axes also have
> incorrect ranges.
>         I would appreciate any help anyone can give me.  Thanks in advance.
> 
>         Sincerely,
> 
>         Karland K.
> 
> --
> "Si spiro, spero." ("If I breathe, I hope.")


Before charging into new functions, try a test case first.  Try and plot
a parabola using:  

circledata=Table[{x,y,Sqrt[x^2+y^2]},{x,-3,3,0.5},{y,-3,3,0.5}];
ListPlot3d[circledata]

Doing this will return you an error message which will prompt you to
look at the manual entry for ListPlot3D and you will find out that
ListPlot3D does not handle ordered triplets, only 2-D arrays
representing Z values.  The function that does handle ordered triplets
is ListSurfacePlot3D, part of the Graphics`Graphics3D` package.  For
example:


circledata=Table[{x,y,Sqrt[x^2+y^2]},{x,-3,3,0.5},{y,-3,3,0.5}];
ListSurfacePlot3D[circledata]

returns a nice parabola.


When you read in your data, start out with a small file and look at the
data manually and make sure it is in the correct format. -- 
Remove the _nospam_ in the return address to respond.



  • Prev by Date: RE: Speeding up ReadList[]?
  • Next by Date: Questions about "collecting" complex exponentials and simplifying expressions
  • Prev by thread: Newbie needs help with 3D plot
  • Next by thread: Newbie needs help with 3D plot