MathGroup Archive 2005

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

Search the Archive

Re: Fancy 3d plotting in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59943] Re: [mg59850] Fancy 3d plotting in Mathematica
  • From: Jeff Bryant <jeffb at wolfram.com>
  • Date: Fri, 26 Aug 2005 04:53:32 -0400 (EDT)
  • References: <200508241030.GAA11936@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

   This should get you pretty close to what you want:

In[1]:= <<Graphics`

In[2]:=
surf = Plot3D[Sin[Sqrt[x*x + y*y]]/Sqrt[x*x + y*y],
     {x, -10, 10}, {y, -10, 10}, PlotRange -> All,
     DisplayFunction -> Identity];

In[3]:=
cntrs = ContourPlot[Sin[Sqrt[x*x + y*y]]/
      Sqrt[x*x + y*y], {x, -10, 10}, {y, -10, 10},
     PlotRange -> All, ContourShading -> False,
     ContourStyle -> Table[{Hue[0.8*x]},
       {x, 0, 1, 0.1}], Contours -> 10,
     PlotPoints -> 30, DisplayFunction -> Identity];

In[4]:=
Show[Graphics3D[{Red, WireFrame[surf][[1]],
     Graphics[cntrs][[1]] /. {x_, y_} -> {x, y, -1}}],
   BoxRatios -> {1, 1, 1/GoldenRatio}, Axes -> True,
   ViewPoint -> {-1, 2, 1}, AxesLabel ->
    {"X axis", "Y axis", "Z axis"}]

-Jeff

mike_in_england2000 at yahoo.co.uk wrote:
> Hi
> 
> Using 3D plot I can make a very nice surface plot of the sinc function:
> 
> Plot3D[Sin[Sqrt[x*x +
>       y*y]]/Sqrt[x*x + y*y], {x, -10, 10}, {y, -10, 10}, PlotRange ->
> All]
> 
> and I can do Contour plots:
> 
> ContourPlot[Sin[Sqrt[x*x + y*y]]/Sqrt[x*x + y*y], {x, -10, 10}, {
>     y, -10, 10}, PlotRange -> All]
> 
> And all this is very nice.  However is it straightforward to combine
> these plots a la Gnuplot:
> 
> http://chem.skku.ac.kr/~wkpark/tutor/gnuplot/gpdocs/imgs/contours17.png
> 
> Thanks for your time
> 
> Mike


  • Prev by Date: Re: format of "Solve" output
  • Next by Date: Re: The updated version of Notations Package
  • Previous by thread: Fancy 3d plotting in Mathematica
  • Next by thread: Re: Fancy 3d plotting in Mathematica