<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>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.</div><div><br></div><div><a href="https://matplotlib.org/api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface">https://matplotlib.org/api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface</a></div><div>There are some examples of using some of these keyword arguments here: <a href="https://matplotlib.org/examples/mplot3d/index.html">https://matplotlib.org/examples/mplot3d/index.html</a></div><div><br></div><div>Ben Root</div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 27, 2018 at 4:34 PM Xiaosong Zhu <<a href="mailto:zxs.201@gmail.com">zxs.201@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="ZH-CN" link="blue" vlink="#954F72"><div class="m_-4603927043652905426WordSection1"><p class="MsoNormal"><span lang="EN-US">Dear Ben,</span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt">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!<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt">Thank you very much for your help!<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt">Sincerely,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt">Xiaosong<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:SimSun"><u></u> <u></u></span></p><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal" style="border:none;padding:0cm"><b>发件人<span lang="EN-US">: </span></b><span lang="EN-US"><a href="mailto:ben.v.root@gmail.com" target="_blank">Benjamin Root</a><br></span><b>发送时间<span lang="EN-US">: </span></b><span lang="EN-US">2018</span>年<span lang="EN-US">11</span>月<span lang="EN-US">27</span>日<span lang="EN-US"> 22:20<br></span><b>收件人<span lang="EN-US">: </span></b><span lang="EN-US"><a href="mailto:zxs.201@gmail.com" target="_blank">zxs.201@gmail.com</a><br></span><b>抄送<span lang="EN-US">: </span></b><span lang="EN-US"><a href="mailto:matplotlib-users@python.org" target="_blank">Matplotlib-users</a><br></span><b>主题<span lang="EN-US">: </span></b><span lang="EN-US">Re: [Matplotlib-users] (no subject)</span></p></div><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:SimSun"><u></u> <u></u></span></p><div><div><p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US">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.</span><span lang="EN-US" style="font-size:12.0pt"><u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">Does that help?</span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">Ben Root</span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div></div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><div><div><p class="MsoNormal"><span lang="EN-US">On Tue, Nov 27, 2018 at 4:05 PM Xiaosong Zhu <<a href="mailto:zxs.201@gmail.com" target="_blank">zxs.201@gmail.com</a>> wrote:</span></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm"><div><div><p class="MsoNormal"><span lang="EN-US">Hi Everyone!</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">May I ask a question. Is it possible to plot the 3D iso-surface figures? Like the figures plotted by isosurface in MATLAB?</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US"><a href="https://www.mathworks.com/help/matlab/ref/isosurface.html" target="_blank">https://www.mathworks.com/help/matlab/ref/isosurface.html</a></span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">Or like the 1<sup>st</sup> figure in </span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US"><a href="https://en.wikipedia.org/wiki/Atomic_orbital" target="_blank">https://en.wikipedia.org/wiki/Atomic_orbital</a>.</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">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?</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">Thanks very much!</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">Sincerely,</span></p><p class="MsoNormal"><span lang="EN-US">Xiaosong</span></p></div></div></blockquote></div><p class="MsoNormal" style="margin-left:4.8pt"><span lang="EN-US">_______________________________________________<br>Matplotlib-users mailing list<br><a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br><a href="https://mail.python.org/mailman/listinfo/matplotlib-users" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:SimSun"><u></u> <u></u></span></p></div></div></blockquote></div>