Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: ListPlot3D
Replies: 2   Last Post: Jun 17, 2013 6:15 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bill Rowe

Posts: 1,647
Registered: 3/14/08
Re: ListPlot3D
Posted: Jun 17, 2013 6:15 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 6/16/13 at 5:15 AM, Anthony.J.Mannucci@jpl.nasa.gov (amannucci)
wrote:

>I could use some help with ListPlot3D. These are examples from the
>documentation. My preconceived notion of what this should do is
>place a data point at coordinates {x,y,z} and connect a surface
>along the z_i. Here is an example from the Mathematica
>documentation:


>ListPlot3D[{{1, 1, 1, 1}, {1, 2, 1, 2}, {1, 1, 3, 1}, {1, 2, 1, 4}},
>Mesh -> All]


>I cannot figure out how to read these data. What are the x,y values?

ListPlot3D works in the same manner as ListPlot. When you do

ListPlot[{2,4,6,3}]

You are supplying a list of y-coordinates with implied
x-coordinates running from 1 to 4. So, the first point is
plotted at (1,2), the second at (2,4) and so on.

Likewise, ListPlot3D takes an array of z-valus with implied
values for both the x and y coordinates. The first row has an x
coordinate of 1 with y coordinates running from 1 to 4. The next
row has an x coordinate of 2 with y coordinates running from 1
to 4 and so on.

To see this look at

ListPlot3D[{{5, 1, 1, 1}, {1, 2, 1, 2}, {1, 1, 3, 1}, {1, 2, 1, 4}},
Mesh -> All]

and

ListPlot3D[{{1, 5, 1, 1}, {1, 2, 1, 2}, {1, 1, 3, 1}, {1, 2, 1, 4}},
Mesh -> All]

and notice where the peak appears in the resulting plot.

>when I feed in the following data set, the graph is completely blank:

>{{0., 0., 0.}, {0.1, 0.1, 0.248514}, {0.2, 0.2, 0.329812}, {0.3, 0.3,
>0.324989}, {0.4, 0.4, 0.275382}, {0.5, 0.5, 0.207606}, {0.6, 0.6,
>0.138975}, {0.7, 0.7, 0.0799098}, {0.8, 0.8, 0.0358315}, {0.9, 0.9,
>0.008981}, {1., 1., 0.}}


With this data set at every point {x, y, z}, the x and y
coordinates are identical. Consequently, it defines a curve in
space not a surface.

>x and y span 0->1. There are z-values, but nothing is plotted. If I manually change the first three data points to be (mimicing the docs):
>{0., 0., 0.}, {1.0, 0.0, 0.248514}, {0., 1., 0.329812}


Right, now you have defined a surface since you have altered the
x,y coordinates so they are not equal everywhere.




Date Subject Author
6/17/13
Read Re: ListPlot3D
David Park
6/17/13
Read Re: ListPlot3D
Bill Rowe

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.