Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

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

Search the Archive

Re: ListPlot3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131212] Re: ListPlot3D
  • From: Sseziwa Mukasa <mukasa at gmail.com>
  • Date: Mon, 17 Jun 2013 06:30:12 -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
  • References: <20130616091535.14FD669E6@smc.vnet.net>


On Jun 16, 2013, at 5:15 AM, amannucci <Anthony.J.Mannucci at jpl.nasa.gov> 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?

They are implicit, when given an array with second dimension other than 3 ListPlot3D assumes x goes from 1 to the number of rows and similarly for y and the columns.

> They are apparently "the x and y coordinate values for each data point to be successive integers starting at 1." How does this thread through the data? For the first point, x=1, y=1, z=1. For the last point, x=4,y=4, z= 4. What about intermediate points? I can't figure it out. Is it x=1, y= 1..4, x=2,y=1..4,x=3,y=1..4,x=4,y=1..4? The documentation does not say.
>
> There is also the data triplets. E.g. from the documentation,
> ListPlot3D[{{0, 0, 1}, {1, 0, 0}, {0, 1, 0}}, Mesh -> All]
>
> This I understand. It is a triplet of {x,y,z}. However, 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.}}
>
> 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}
>
> I then see a surface. I cannot figure this out.

Your data does not define a 2D surface. It defines a 1D curve the graphics primitives for the surface vanish.  You could interpolate you data and use ParametricPlot3D:

z=Interpolation[data[[All,2::]],InterpolationOrder->1];

ParametricPlot3D[{u,u,z[u]},{u,0,1}]

>
> Thanks for any help you can provide.
>
>
>



  • References:
    • ListPlot3D
      • From: amannucci <Anthony.J.Mannucci@jpl.nasa.gov>
  • Prev by Date: Re: How does one get data out of a TemporalData object?
  • Next by Date: Re: Getting the plotted data from a graph
  • Previous by thread: ListPlot3D
  • Next by thread: Re: ListPlot3D