MathGroup Archive 2009

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

Search the Archive

Re: countour plot (in 3D)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105376] Re: countour plot (in 3D)
  • From: dh <dh at metrohm.com>
  • Date: Mon, 30 Nov 2009 06:10:41 -0500 (EST)
  • References: <heod8g$4du$1@smc.vnet.net>


Claus wrote:

> Hi,

> I have a set of 720 measurements at locations (x,y,z), each associated 

> with a value (f).

> 

> The y is constant for all locations. So I can generate a ListContourPlot 

> quite easily and nicely.

> 

> Now I want to show the contour in 3D. This means essentially I want to 

> show a contoured plane in 3D. I want to do this in 3D because I want to 

> add other sets of measurements which are at different (x,y,z) locations 

> (other planes), subsequently.

> 

> How can this be done?

> 

> I tried ListContourPlot3D, however it tells me this (which I don't 

> understand):

> 

> ListContourPlot3D::invpts: "\!\(\*

> StyleBox[\"\"\", \"MT\"]\)-- Message text not found --

> 

> Can anybody tell what this message means (or what I am doing wrong)?

> 

> What excatly can I adjust with the option Contours? The help says "how 

> many or what contour surfaces to show". Does that mean, for my first try 

> with the one set of 720 measurements I would put Contours->{1}?

> 

> Thank you,

> Claus

> 

> 

> 

Hi Claus,

if I understand correctly, you want to project a 2dim graphics onto a 

3dim plane.

here is a hack to do this:



we first create the contours:

d = Table[x^2 + y^2, {x, 10}, {y, 10}];

t = ListContourPlot[d];

t[[1]] contains the essential graphics. We the replace every 2dim 

coordinate by a three dim coordinate. E.g.:

t[[1]] /. {x_?NumberQ, y_?NumberQ} -> {x, y, 0}

Then we need to tell mathematica that this is a 3dim graohics by wraping 

3D around the object:

Graphics3D[t[[1]] /. {x_?NumberQ, y_?NumberQ} -> {x, y, 0} ]



All together for two different planes:



Show[Graphics3D[t[[1]] /. {x_?NumberQ, y_?NumberQ} -> {x, y, 0} ],

  Graphics3D[t[[1]] /. {x_?NumberQ, y_?NumberQ} -> {x, y, 10} ]]



Daniel




  • Prev by Date: Re: piecewice pdf, problems with cdf
  • Next by Date: Re: Using GraphPlot to draw an empty graph
  • Previous by thread: Re: countour plot (in 3D)
  • Next by thread: ItemSize and ImageSize->Full , I do not understand what happens