MathGroup Archive 2009

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

Search the Archive

Re: ListShadowPlot3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103734] Re: [mg103722] ListShadowPlot3D
  • From: Mark McClure <mcmcclur at unca.edu>
  • Date: Sun, 4 Oct 2009 05:36:00 -0400 (EDT)
  • References: <200910031305.JAA06268@smc.vnet.net>

On Sat, Oct 3, 2009 at 9:05 AM, Pasha Karami <karami at geo.uu.nl> wrote:
> I would like to plot 3D and contour plot of a list of data together
> (in one plot) in Mathematica6.
> I know in Mathematica 5.2 with ListShadowPlot3D we could
> plot what i need.

Plot3D and ListPlot3D return their output in the form
Graphics3D[GraphicsComplex[{points, primitives}]]
Thus, you can generate the plots, project the points,
and display it all together.  Here's an example:

data = Table[
     3 (1 - x)^2 Exp[-x^2 - (y + 1)^2] -
     10 (x/5 - x^3 - y^5) Exp[-x^2 - y^2] -
     (1/3) Exp[-(x + 1)^2 - y^2] + 20,
   {x, -3, 3, 0.5}, {y, -3, 3, 0.5}];

pic = ListPlot3D[data, PlotRange -> All,
  InterpolationOrder -> 2, MeshFunctions -> {#3 &},
  ColorFunction -> (ColorData["SouthwestColors"][#3] &)];

project[{x_, y_, z_}] = {x, y, 0};
project[list : {{_, _, _} ..}] := project /@ list;
Show[{pic, MapAt[project, pic, {1, 1}]},
  PlotRange -> All, ViewPoint -> {2.06082, -2.4884, 1.0054}]

Mark McClure


  • Prev by Date: Re: Using Mathematica with C++
  • Next by Date: Re: on passing arguments to a function, how to break a list into separate items during a call?
  • Previous by thread: ListShadowPlot3D
  • Next by thread: ma-notebooks to nb-notebooks conversion