[Matplotlib-users] (no subject)

Xiaosong Zhu zxs.201 at gmail.com
Tue Nov 27 17:21:28 EST 2018


Dear Ben,

Thank you very much! Now that I know it is possible, I will carefully read the manual and solve the problem!

Sincerely,
Xiaosong


发件人: Benjamin Root
发送时间: 2018年11月27日 22:50
收件人: zxs.201 at gmail.com
抄送: Matplotlib-users
主题: Re: [Matplotlib-users] (no subject)

The default settings for plot_surface() yields an surface with the same color. There are multiple ways to color the surface, either by supplying color information yourself via "facecolors", or turning on the "shade", and/or providing a "lightsource" object for custom shading. Unfortunately, the docs are pretty sparse in this area, but hopefully this will help.

https://matplotlib.org/api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface
There are some examples of using some of these keyword arguments here: https://matplotlib.org/examples/mplot3d/index.html

Ben Root


On Tue, Nov 27, 2018 at 4:34 PM Xiaosong Zhu <zxs.201 at gmail.com> wrote:
Dear Ben,
 
Thank you very much! I guess so and I will check that! I previously saw some examples but thought colour could only be the same at the same height. But this may not be true. The cubes may be also helpful!
 
Thank you very much for your help!
 
Sincerely,
Xiaosong
 
发件人: Benjamin Root
发送时间: 2018年11月27日 22:20
收件人: zxs.201 at gmail.com
抄送: Matplotlib-users
主题: Re: [Matplotlib-users] (no subject)
 
plot_surface() in mplot3d can ultimately do what you want, but you need to provide it the isosurface. I think scikit-image can provide that information with its marching cubes function.
 
Does that help?
 
Ben Root
 
 
On Tue, Nov 27, 2018 at 4:05 PM Xiaosong Zhu <zxs.201 at gmail.com> wrote:
Hi Everyone!
 
May I ask a question. Is it possible to plot the 3D iso-surface figures? Like the figures plotted by isosurface in MATLAB?
 
https://www.mathworks.com/help/matlab/ref/isosurface.html
 
Or like the 1st figure in 
 
https://en.wikipedia.org/wiki/Atomic_orbital.
 
I need this because I would like to plot the configure of target molecular orbitals using the data calculated from first-principle calculation. I have looked through the examples of the website. There are only examples similar to this but not the same?
 
Thanks very much!
 
Sincerely,
Xiaosong
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org
https://mail.python.org/mailman/listinfo/matplotlib-users
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20181127/31811784/attachment-0001.html>


More information about the Matplotlib-users mailing list