On Mon, Mar 14, 2011 at 9:05 AM, herbie13 <g.h.herbert@dur.ac.uk> wrote:


I basically have a Chi-Squared distribution that is dependent on 3
eg. X2(x, y, z)

What I would like to do is be able to plot the chi-squared + 1 surface in
eg. I would like to have the three axes as x, y and z. and then have a
surface (its going to look like a closed blob effectively) that maps the
chi-squared plus one surface.

I have no idea how to do this though. Is it possible? any ideas?

I think matplotlib is relatively limited in its 3D capabilities. I would suggest trying Mayavi2 with a contour3d[1] or a volume[2,3]. Look here[4] for many examples.

[1] http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/mlab_helper_functions.html#enthought.mayavi.mlab.contour3d
[2] http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/example_chemistry.html#example-chemistry
[3] http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/example_protein.html#example-protein
[4] http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/examples.html