[Date Index]
[Thread Index]
[Author Index]
Re: ListPlot3D
*To*: mathgroup at smc.vnet.net
*Subject*: [mg131203] Re: ListPlot3D
*From*: Bill Rowe <readnews at sbcglobal.net>
*Date*: Mon, 17 Jun 2013 06:27:11 -0400 (EDT)
*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com
*Delivered-to*: l-mathgroup@wolfram.com
*Delivered-to*: mathgroup-outx@smc.vnet.net
*Delivered-to*: mathgroup-newsendx@smc.vnet.net
On 6/16/13 at 5:15 AM, Anthony.J.Mannucci at 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.
Prev by Date:
**Re: ListPlot3D**
Next by Date:
**Re: Working with arrays**
Previous by thread:
**Re: ListPlot3D**
Next by thread:
**HTML output**
| |