Re: Newbie needs help with 3D plot
- To: mathgroup@smc.vnet.net
- Subject: [mg12052] Re: [mg11974] Newbie needs help with 3D plot
- From: Sean Ross <seanross@worldnet.att.net>
- Date: Fri, 24 Apr 1998 01:52:22 -0400
- References: <199804170621.CAA29163@smc.vnet.net.>
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.
- References:
- Newbie needs help with 3D plot
- From: k-kilian@students.uiuc.edu (karland arthur kilian)
- Newbie needs help with 3D plot