I have a master equation for $P(N_A^+,N_B^+,N_C^+,t)$, with $N_A^+,N_B^+,N_C^+$ all discrete. The numerical integration is done by this Matlab program using Euler's method. Despite the crude Euler's method, the results from numerical integration are in agreement with the simulation, so the correctness of the program is not the focus.

I want to see how $P(N_A^+,N_B^+,N_C^+,t)$ evolves over time. Since $P(N_A^+,N_B^+,N_C^+,t)$ has 3 more coordinates in addition to time, it is really hard to visualize the changes. Ideally, I want to have something like

enter image description here

But I cannot find any function in Matlab that can does something similar. The closest thing I can find is Matlab's contourslice function.

By running the Matlab program mentioned above with


you will get something like the following:

enter image description here

enter image description here

You can guess what happens to $P(N_A^+,N_B^+,N_C^+,t)$, but it is nowhere as obvious as the atomic orbital graph.

My question is, how can I plot $P(N_A^+,N_B^+,N_C^+,t)$ in way similar to the atomic orbital density plot? Or can anyone suggest better way to visualize the time evolution of $P(N_A^+,N_B^+,N_C^+,t)$?

  • $\begingroup$ Cool plot! Where did that come from? $\endgroup$ – meawoppl Mar 2 '14 at 19:29
  • $\begingroup$ @meawoppl, the upper plot comes from here, the lower 6 plots are from contourslice in Matlab. $\endgroup$ – wdg Mar 3 '14 at 3:11
  • $\begingroup$ dead link, fixed one here $\endgroup$ – bhbr Aug 14 at 20:22

There is a nice volume rendering toolbox for MATLAB:


I think you could tweak it for your purposes.

  • $\begingroup$ looks very useful! $\endgroup$ – wdg Feb 28 '14 at 12:30
  • $\begingroup$ I would encourage those in Python land with the same questions to checkout out mayavi2: docs.enthought.com/mayavi/mayavi $\endgroup$ – meawoppl Mar 2 '14 at 19:29

Programs like Visit and Paraview can do "volume rendering", which is what you show in your figure. You just need to export the data you have in a format that either of these programs can read.


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.