Re: Surface Plots (HELP!!!)

• To: mathgroup at smc.vnet.net
• Subject: [mg9103] Re: Surface Plots (HELP!!!)
• From: "Stephen P Luttrell" <luttrell at signal.dra.hmg.gb>
• Date: Mon, 13 Oct 1997 23:33:17 -0400
• Organization: Defence Evaluation and Research Agency
• Sender: owner-wri-mathgroup at wolfram.com

```> I am trying to graphically display a 3D probability distribution given
> by a function
> f(x,y,z) = probability, how can I do this?? It would be sufficient (even
> preferable) to plot the surface eclosing 95% probability, how can I do
> this??

You can do this with the package Graphics`ContourPlot3D`. Here is a
Mathematica 3 notebook that gives an example plot for a mixture of two
Gaussian PDFs.

Notebook[{

Cell[CellGroupData[{
Cell["Plot a Mixture of 2 Gaussians", "Section"],

Cell[BoxData[
\(<< Graphics`ContourPlot3D`\)], "Input"],

Cell[BoxData[
\(f[x_, y_, z_] :=
Exp[\(-\(\(\((\((x - 1)\)\^2 + \((y - 1)\)\^2)\) + z\^2\)\/2\)\)] +
Exp[\(-\(\(\((\((x + 1)\)\^2 + \((y + 1)\)\^2)\) +
z\^2\)\/2\)\)]\)],
"Input"],

Cell[BoxData[
\(\(ContourPlot3D[
f[x, y, z] - 0.6, {x, \(-2\), 2}, {y, \(-2\), 2}, {z, \(-2\), 2}];
\)\)], "Input"]
}, Open  ]]
},
FrontEndVersion->"Microsoft Windows 3.0",
ScreenRectangle->{{0, 1024}, {0, 712}},
WindowSize->{496, 604},
WindowMargins->{{111, Automatic}, {Automatic, 23}}
]

--
Stephen P Luttrell
luttrell at signal.dra.hmg.gb
Adaptive Systems Theory                           01684-894046 (phone)
Room EX21, DERA                                    01684-894384 (fax)

Malvern, Worcs, WR14 3PS, U.K.
http://www.dra.hmg.gb/cis5pip/Welcome.html

```

• Prev by Date: Re: Useful Dumb User Questions
• Next by Date: Working with large data files (hundreds of megas)
• Previous by thread: Surface Plots (HELP!!!)
• Next by thread: MathLink, MS Visual C++ 5.0: running in debugger