I'm trying to visualize the propagation of heat in a discrete sphere surface. The sphere is hollow, only the voxels of the boundary have value.

Visualization in matlab using isosurface shows correct color over the surface.

I would like to show iso-contours over this visualization but this is difficult in matlab. Searching for alternatives to visualize the data I've found python + numpy + mayavi2 and immediately fell in love with them.

Playing with maiavi I can obtain my desired kind of plots with parametric surfaces but I cannot reproduce the same results with my volumetric, discrete sphere. The following code,

lines = [0.1, 0.3, 0.5, 0.7, 1, 1.5, 1.8, 2.3, 2.8, 3.0, 3.1]

only shows uniform color sphere. Enabling contours or not, does not change the result. No iso-heat lines nor even color over the surface

Anyone knows the correct approach to show the iso-heat contours?

  • $\begingroup$ What is the variable heatmap here? A scalar field? If so, you are seeing the sphere associated with the outermost isocontour. $\endgroup$
    – meawoppl
    Jun 10, 2012 at 7:28

1 Answer 1


Probably you should have a look at the example in the Mayavi2 docs. This should help you.

I haven't done it in a while, but I remember that one of the important issues was to get the data into a useful structured grid.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.